Skip to content

Commit

Permalink
refactor: Trip eq is better
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Apr 30, 2024
1 parent 4135675 commit 7200207
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/diff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ function diffElementNodes(
let checked;

// Tracks entering and exiting namespaces when descending through the tree.
if (nodeType == 'svg') namespace = 2;
else if (nodeType == 'math') namespace = 3;
if (nodeType === 'svg') namespace = 2;
else if (nodeType === 'math') namespace = 3;

if (excessDomChildren != null) {
for (i = 0; i < excessDomChildren.length; i++) {
Expand Down Expand Up @@ -502,7 +502,7 @@ function diffElementNodes(
newVNode,
oldVNode,
globalContext,
nodeType == 'foreignObject' ? 1 : namespace,
nodeType === 'foreignObject' ? 1 : namespace,
excessDomChildren,
commitQueue,
excessDomChildren
Expand Down

0 comments on commit 7200207

Please sign in to comment.