Skip to content

Commit

Permalink
Variable processing to determine duplicate true/false values (#593)
Browse files Browse the repository at this point in the history
nojiritakeshi authored Oct 3, 2023
1 parent c0ac967 commit 60fc443
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/million/block.ts
Original file line number Diff line number Diff line change
@@ -299,7 +299,8 @@ const getCurrentElement = (
): HTMLElement => {
const pathLength = path.length;
if (!pathLength) return root;
if (cache && key !== undefined && cache[key]) {
const isCacheAndKeyExists = cache && key !== undefined;
if (isCacheAndKeyExists && cache[key]) {
return cache[key]!;
}
// path is an array of indices to traverse the DOM tree
@@ -310,7 +311,7 @@ const getCurrentElement = (
const siblings = path[i]!;
root = childAt(root, siblings);
}
if (cache && key !== undefined) cache[key] = root;
if (isCacheAndKeyExists) cache[key] = root;
return root;
};

3 comments on commit 60fc443

@vercel
Copy link

@vercel vercel bot commented on 60fc443 Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

million-kitchen-sink – ./packages/kitchen-sink

million-kitchen-sink-millionjs.vercel.app
million-kitchen-sink.vercel.app
million-kitchen-sink-git-main-millionjs.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 60fc443 Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sink – ./packages/kitchen-sink

million-kitchen-sink-atit.vercel.app
sink-git-main-millionjs.vercel.app
sink-millionjs.vercel.app
sink.million.dev

@vercel
Copy link

@vercel vercel bot commented on 60fc443 Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.