diff --git a/packages/node_modules/overmind-devtools-client/src/overmind/operators.ts b/packages/node_modules/overmind-devtools-client/src/overmind/operators.ts index 358133a4..50034972 100644 --- a/packages/node_modules/overmind-devtools-client/src/overmind/operators.ts +++ b/packages/node_modules/overmind-devtools-client/src/overmind/operators.ts @@ -159,8 +159,13 @@ export const updateDerived: () => Operator = () => const actualPath = Array.isArray(message.data.path) ? message.data.path : (message.data.path as any).split('.') const path = actualPath.slice() const key = path.pop() - const target = path.reduce((aggr, pathKey) => aggr[pathKey], appState) - target[key] = message.data.value + const target = path.reduce((aggr, pathKey) => aggr && aggr['__CLASS__'] ? aggr[pathKey].value : aggr[pathKey], appState) + + if (target['__CLASS__']) { + target.value[key] = message.data.value + } else { + target[key] = message.data.value + } state.apps[message.appName].derived[actualPath.join(state.apps[message.appName].delimiter)] = message.data })