Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishiv committed Jul 8, 2024
1 parent 8427c99 commit 3650358
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alfama",
"version": "1.1.2",
"version": "1.1.3",
"author": "Abhishiv Saxena<[email protected]>",
"license": "MIT",
"description": "Fine-grained reactive library with no compiler, no magic, and no virtual DOM",
Expand Down
5 changes: 4 additions & 1 deletion src/core/state/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ export const createStore = <T = unknown>(
const cursor = cursorStr === "" ? [] : decodeCursor(cursorStr);
if (change === undefined) {
match =
encodeCursor(changePath.slice(0, cursor.length)) == cursorStr;
cursor.length <= changePath.length
? encodeCursor(changePath.slice(0, cursor.length)) ==
cursorStr
: true;
} else if (
change &&
["splice", "push", "pop"].indexOf(change.name) > -1
Expand Down

0 comments on commit 3650358

Please sign in to comment.