Skip to content

Commit 8d0a3d0

Browse files
fix(proxy-state-tree): fix tracking paths of derived
1 parent 1d45154 commit 8d0a3d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,6 @@ export class Proxifier {
205205
const nestedPath = proxifier.concat(path, prop)
206206
const currentTree = trackingTree || proxifier.tree
207207

208-
trackingTree && trackingTree.proxifier.trackPath(nestedPath)
209-
currentTree.trackPathListeners.forEach((cb) => cb(nestedPath))
210-
211208
if (typeof targetValue === 'function') {
212209
return proxifier.tree.master.options.dynamicWrapper
213210
? proxifier.tree.master.options.dynamicWrapper(
@@ -216,6 +213,9 @@ export class Proxifier {
216213
targetValue
217214
)
218215
: targetValue(proxifier.tree, nestedPath)
216+
} else {
217+
currentTree.trackPathListeners.forEach((cb) => cb(nestedPath))
218+
trackingTree && trackingTree.proxifier.trackPath(nestedPath)
219219
}
220220

221221
if (targetValue === undefined) {

0 commit comments

Comments
 (0)