File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
typescript/packages/lookslike-high-level/src/components Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -417,11 +417,21 @@ export class CommonSidebar extends LitElement {
417417 } ;
418418
419419 const onQueryChanged = ( e : CustomEvent ) => {
420- this . setField ( "query" , JSON . parse ( e . detail . state . doc . toString ( ) ) ) ;
420+ try {
421+ const parsed = JSON . parse ( e . detail . state . doc . toString ( ) ) ;
422+ this . setField ( "query" , parsed ) ;
423+ } catch ( err ) {
424+ console . warn ( "Failed to parse query JSON:" , err ) ;
425+ }
421426 } ;
422427
423428 const onDataChanged = ( e : CustomEvent ) => {
424- this . setField ( "data" , JSON . parse ( e . detail . state . doc . toString ( ) ) ) ;
429+ try {
430+ const parsed = JSON . parse ( e . detail . state . doc . toString ( ) ) ;
431+ this . setField ( "data" , parsed ) ;
432+ } catch ( err ) {
433+ console . warn ( "Failed to parse data JSON:" , err ) ;
434+ }
425435 } ;
426436
427437 const copyRecipeLink = ( event : Event ) => {
You can’t perform that action at this time.
0 commit comments