Skip to content

Commit

Permalink
fix: delay in applying custom helpers to current state
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenrui committed Mar 25, 2024
1 parent 673f632 commit d0437ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export class State {
setState(target, property, value) {
const varName = this.getVariableName(property)

target[varName] = value
target[varName] = Array.isArray(value) ? new MiniArray(...value) : value

if (!this.shouldRerender(property)) return
if (!this.hasDependency(varName)) return
Expand All @@ -195,7 +195,7 @@ export class State {
setEntityState(target, property, value, entityID) {
const varName = this.getVariableName(property)

target[varName] = value
target[varName] = Array.isArray(value) ? new MiniArray(...value) : value

if (!this.shouldRerender(property)) return
if (!this.hasDependency(entityID)) return
Expand Down

0 comments on commit d0437ea

Please sign in to comment.