Skip to content

Commit 52961f7

Browse files
fix(proxy-state-tree): only dispose mutation trees when unbound action finishes
1 parent cc502ad commit 52961f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/node_modules/proxy-state-tree/src/Proxyfier.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ export class Proxifier {
2626
ensureMutationTrackingIsEnabled(path) {
2727
if (this.tree.master.options.devmode && !this.tree.canMutate()) {
2828
throw new Error(
29-
`proxy-state-tree - You are mutating the path "${path}", but it is not allowed`
29+
`proxy-state-tree - You are mutating the path "${path}", but it is not allowed. The following could have happened:
30+
31+
- You are passing state to a 3rd party tool trying to manipulate the state
32+
- You are running an asynchronous action from an other action where you forgot to "await" it
33+
`
3034
)
3135
}
3236
}

0 commit comments

Comments
 (0)