@@ -273,29 +273,25 @@ class AppEditor extends Tonic {
273
273
const model = this . editor . getModel ( )
274
274
275
275
model . onDidChangeContent ( async ( ) => {
276
- clearTimeout ( this . writeDebounce )
277
-
278
276
if ( ! this . projectNode ) return
279
277
const value = this . editor . getValue ( )
280
278
const coTerminal = document . querySelector ( 'app-terminal' )
281
279
const coProperties = document . querySelector ( 'app-properties' )
282
280
283
- this . writeDebounce = setTimeout ( ( ) => {
284
- if ( this . projectNode . label === 'settings.json' && this . projectNode . parent . id === 'root' ) {
281
+ if ( this . projectNode . label === 'settings.json' && this . projectNode . parent . id === 'root' ) {
285
282
286
- try {
287
- this . props . parent . state . settings = JSON . parse ( value )
288
- } catch ( err ) {
289
- coTerminal . error ( `Unable to parse settings file (${ err . message } )` )
290
- return
291
- }
292
- coTerminal . info ( `Settings file updated.` )
293
- coProperties . reRender ( )
294
- parent . activatePreviewWindows ( )
283
+ try {
284
+ this . props . parent . state . settings = JSON . parse ( value )
285
+ } catch ( err ) {
286
+ coTerminal . error ( `Unable to parse settings file (${ err . message } )` )
287
+ return
295
288
}
289
+ coTerminal . info ( `Settings file updated.` )
290
+ coProperties . reRender ( )
291
+ parent . activatePreviewWindows ( )
292
+ }
296
293
297
- this . writeToDisk ( this . projectNode , value )
298
- } , 620 )
294
+ this . writeToDisk ( this . projectNode , value )
299
295
} )
300
296
301
297
window . matchMedia ( '(prefers-color-scheme: dark)' ) . addEventListener ( 'change' , event => {
0 commit comments