File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
packages/node_modules/proxy-state-tree/src Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -145,11 +145,14 @@ export class Proxifier {
145145 getMutationTree ( ) {
146146 return this . tree . master . mutationTree || ( this . tree as IMutationTree < any > )
147147 }
148- private createArrayProxy ( value , path ) {
149- if (
148+ private isProxyCached ( value , path ) {
149+ return (
150150 value [ this . CACHED_PROXY ] &&
151151 String ( value [ this . CACHED_PROXY ] [ PATH ] ) === String ( path )
152- ) {
152+ )
153+ }
154+ private createArrayProxy ( value , path ) {
155+ if ( this . isProxyCached ( value , path ) ) {
153156 return value [ this . CACHED_PROXY ]
154157 }
155158
@@ -253,10 +256,7 @@ export class Proxifier {
253256 }
254257
255258 private createObjectProxy ( object , path ) {
256- if (
257- object [ this . CACHED_PROXY ] &&
258- String ( object [ this . CACHED_PROXY ] [ PATH ] ) === String ( path )
259- ) {
259+ if ( this . isProxyCached ( object , path ) ) {
260260 return object [ this . CACHED_PROXY ]
261261 }
262262
You can’t perform that action at this time.
0 commit comments