File tree 1 file changed +9
-9
lines changed
packages/devtools/client/components
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function clone() {
22
22
error .value = undefined
23
23
try {
24
24
if (props .state )
25
- proxy .value = JSON .parse (JSON .stringify (props .state ))
25
+ proxy .value = JSON .parse (JSON .stringify (props .state || {} ))
26
26
else if (typeof props .state === ' number' || typeof props .state !== ' string' )
27
27
proxy .value = props .state
28
28
}
@@ -50,15 +50,15 @@ onMounted(() => {
50
50
})
51
51
52
52
function deepSync(from : any , to : any ) {
53
- for ( const key in from ) {
54
- if ( from [key ] === null )
55
- to [ key ] = null
56
- else if (Array .isArray (from [key ]))
57
- to [key ] = from [key ].slice ()
58
- else if (typeof from [key ] === ' object' )
59
- deepSync (from [key ], to [key ])
53
+ // const fromRevision = from[0]
54
+ const fromValue = from [1 ]
55
+ for ( const key in fromValue ) {
56
+ if (Array .isArray (fromValue [key ]))
57
+ to [key ] = fromValue [key ].slice ()
58
+ else if (typeof fromValue [key ] === ' object' )
59
+ deepSync (fromValue [key ], to [key ])
60
60
else
61
- to [key ] = from [key ]
61
+ to [key ] = fromValue [key ]
62
62
}
63
63
}
64
64
You can’t perform that action at this time.
0 commit comments