@@ -393,6 +393,7 @@ async function setData(element, data) {
393393 console . log ( "render-json" , "" ) ;
394394 }
395395
396+ let reference = el . getAttribute ( "reference" ) ;
396397 let action = el . getAttribute ( "actions" ) ;
397398 if ( action && [ "database" , "array" , "object" , "key" ] . includes ( action ) )
398399 continue ;
@@ -420,8 +421,16 @@ async function setData(element, data) {
420421 if ( $update ) {
421422 delete data [ type ] [ 0 ] . $update ;
422423 data [ type ] [ 0 ] = { ...data [ type ] [ 0 ] , ...$update } ;
424+ } else if ( key === "{}" ) {
425+ value = data [ type ] [ 0 ] ;
426+ if ( reference === "false" ) {
427+ delete data [ type ] [ 0 ] . $storage ;
428+ delete data [ type ] [ 0 ] . $database ;
429+ delete data [ type ] [ 0 ] . $array ;
430+ }
431+ } else {
432+ value = CRUD . getValueFromObject ( data [ type ] [ 0 ] , key ) ;
423433 }
424- value = CRUD . getValueFromObject ( data [ type ] [ 0 ] , key ) ;
425434 }
426435
427436 if ( ! data [ type ] . length ) continue ;
@@ -431,6 +440,7 @@ async function setData(element, data) {
431440 ( isListen === "false" && ! data . method . endsWith ( ".read" ) )
432441 )
433442 continue ;
443+
434444 // TODO: object.update data returned from server will not include $operator
435445 el . setValue ( value ) ;
436446 }
0 commit comments