File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
packages/devtools/client/components Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function clone() {
2222 error .value = undefined
2323 try {
2424 if (props .state )
25- proxy .value = JSON .parse (JSON .stringify (props .state ))
25+ proxy .value = JSON .parse (JSON .stringify (props .state || {} ))
2626 else if (typeof props .state === ' number' || typeof props .state !== ' string' )
2727 proxy .value = props .state
2828 }
@@ -50,15 +50,15 @@ onMounted(() => {
5050})
5151
5252function 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 ])
6060 else
61- to [key ] = from [key ]
61+ to [key ] = fromValue [key ]
6262 }
6363}
6464
You can’t perform that action at this time.
0 commit comments