Skip to content

Commit 364e05e

Browse files
committed
styling
1 parent 034fa73 commit 364e05e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/backend/linkFiber.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ function createTree(
474474
const lastClass = currentFiber.child.stateNode.classList[
475475
currentFiber.child.stateNode.classList.length - 1
476476
];
477-
if (lastClass.includes('fromLinkFiber')) {
477+
if (typeof lastClass[lastClass.length - 1] === 'string') {
478478
currentFiber.child.stateNode.classList.remove(lastClass);
479479
}
480480
}

src/backend/tree.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { createGenerateClassName } from "@material-ui/styles";
1111

1212
let copyInstances = 0;
1313
const circularComponentTable = new Set<Tree>();
14-
let componentNames = {}
14+
let componentNames = {};
1515

1616
// Removes unserializable state data such as functions
1717
function scrubUnserializableMembers(tree: Tree): Tree {
@@ -90,7 +90,7 @@ class Tree {
9090
componentNames = {};
9191
}
9292
//check for duplicate
93-
else if (componentNames[name] !== undefined) {
93+
else if (componentNames[name]) {
9494
const count = componentNames[name] + 1;
9595
const newName = name + count;
9696
componentNames[name] = count;

0 commit comments

Comments
 (0)