We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57b8f39 commit e2a74d0Copy full SHA for e2a74d0
packages/node_modules/proxy-state-tree/src/index.ts
@@ -83,10 +83,10 @@ export class ProxyStateTree<T extends object> implements IProxyStateTree<T> {
83
)
84
}
85
onRemoveProxy(cb: IRemoveProxyCallback) {
86
- const index = this.removeProxyCallbacks.push(cb) - 1
+ this.removeProxyCallbacks.push(cb)
87
88
return () => {
89
- this.removeProxyCallbacks.splice(index, 1)
+ this.removeProxyCallbacks.splice(this.removeProxyCallbacks.indexOf(cb), 1)
90
91
92
removeProxy(path: string) {
0 commit comments