Skip to content

Commit

Permalink
fix: mutation not correctly registered
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Jan 5, 2022
1 parent 7104e01 commit 9ae9d3e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/managers/StoreManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export default class StoreManager extends Manager {
original.call(this, value)
update(key, value)
}
mutations[key] = wrapped.bind(state) as any
if (!mutations[key]) {
mutations[key] = []
}
mutations[key].push(wrapped.bind(state))
Reflect.set(state, key, wrapped)
}
}
Expand Down

0 comments on commit 9ae9d3e

Please sign in to comment.