File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/node_modules/overmind-devtools-client/src/overmind Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -159,8 +159,13 @@ export const updateDerived: () => Operator<DerivedMessage> = () =>
159159 const actualPath = Array . isArray ( message . data . path ) ? message . data . path : ( message . data . path as any ) . split ( '.' )
160160 const path = actualPath . slice ( )
161161 const key = path . pop ( )
162- const target = path . reduce ( ( aggr , pathKey ) => aggr [ pathKey ] , appState )
163- target [ key ] = message . data . value
162+ const target = path . reduce ( ( aggr , pathKey ) => aggr && aggr [ '__CLASS__' ] ? aggr [ pathKey ] . value : aggr [ pathKey ] , appState )
163+
164+ if ( target [ '__CLASS__' ] ) {
165+ target . value [ key ] = message . data . value
166+ } else {
167+ target [ key ] = message . data . value
168+ }
164169
165170 state . apps [ message . appName ] . derived [ actualPath . join ( state . apps [ message . appName ] . delimiter ) ] = message . data
166171 } )
You can’t perform that action at this time.
0 commit comments