Skip to content

Commit

Permalink
fix store implementation for array push
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishiv committed Jul 4, 2024
1 parent 6060832 commit 8427c99
Show file tree
Hide file tree
Showing 2 changed files with 3 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.1",
"version": "1.1.2",
"author": "Abhishiv Saxena<[email protected]>",
"license": "MIT",
"description": "Fine-grained reactive library with no compiler, no magic, and no virtual DOM",
Expand Down
3 changes: 2 additions & 1 deletion src/core/state/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ export const createStore = <T = unknown>(
(p, value, previousValue, change) => {
const changePath = p.split(".");
const toRun = new Set<Wire>();
//console.log("chamge", change, changePath);
// todo: improve this logic
const manager = storeManager as StoreManager;
for (const wire of manager.wires) {
Expand All @@ -288,6 +287,8 @@ export const createStore = <T = unknown>(
change &&
["splice", "push", "pop"].indexOf(change.name) > -1
) {
match =
encodeCursor(changePath.slice(0, cursor.length)) == cursorStr;
// todo: adjust cursors to handle this case
//switch (change.name) {
// case 'insert':
Expand Down

0 comments on commit 8427c99

Please sign in to comment.