Skip to content

Commit f6dfba9

Browse files
fix(overmind): handle listening to root state object in reaction
1 parent 3f5e461 commit f6dfba9

File tree

1 file changed

+1
-1
lines changed
  • packages/node_modules/overmind/src

1 file changed

+1
-1
lines changed

packages/node_modules/overmind/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ export class Overmind<ThisConfig extends IConfiguration>
950950
mutations.forEach((mutation) => {
951951
if (mutation.path.startsWith(path)) {
952952
updateCallback(
953-
path.split(this.delimiter).reduce((aggr, key) => aggr[key], this.state)
953+
path ? path.split(this.delimiter).reduce((aggr, key) => aggr[key], this.state) : this.state
954954
)
955955
}
956956
})

0 commit comments

Comments
 (0)