File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11import isPlainObject from 'is-plain-obj'
22import { IMutation } from 'proxy-state-tree'
3- import { safeValues } from './Devtools'
3+
44import { Derived } from './derived'
5+ import { safeValues } from './Devtools'
56
67export const IS_TEST = process . env . NODE_ENV === 'test'
78export const IS_OPERATOR = Symbol ( 'operator' )
@@ -82,10 +83,10 @@ export function deepCopy(obj) {
8283 const isAGetter = originalDescriptor && 'get' in originalDescriptor
8384 const value = obj [ key ]
8485
85- if ( isPlainObject ( value ) && ! isAGetter ) {
86- aggr [ key ] = deepCopy ( value )
87- } else {
86+ if ( isAGetter ) {
8887 Object . defineProperty ( aggr , key , originalDescriptor as any )
88+ } else {
89+ aggr [ key ] = deepCopy ( value )
8990 }
9091
9192 return aggr
You can’t perform that action at this time.
0 commit comments