From eb9d51e9be12ef308b2b7926f3d30ab6e3f19e35 Mon Sep 17 00:00:00 2001 From: xevidos Date: Tue, 15 Jan 2019 11:01:55 -0500 Subject: [PATCH] Fixed issue where settings would not load after update. --- components/editor/init.js | 9 +++++---- components/settings/init.js | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/components/editor/init.js b/components/editor/init.js index 8a1315b..c12c822 100755 --- a/components/editor/init.js +++ b/components/editor/init.js @@ -334,17 +334,18 @@ $.each( options, async function( idx, key ) { let localValue = await codiad.settings.get_option( 'codiad.' + key ); - if ( localValue !== null ) { + if ( localValue != null ) { - _this.settings[key] = localValue; + _this.settings[key.split('.').pop()] = localValue; } }); $.each( bool_options, async function(idx, key) { + let localValue = await codiad.settings.get_option( 'codiad.' + key ); - if ( localValue !== null ) { + if ( localValue != null ) { - _this.settings[key] = (localValue == 'true').toString(); + _this.settings[key.split('.').pop()] = (localValue == 'true'); } }); }, diff --git a/components/settings/init.js b/components/settings/init.js index 011db05..f5e4042 100755 --- a/components/settings/init.js +++ b/components/settings/init.js @@ -187,7 +187,7 @@ let key = await $( item ).attr( 'data-setting' ); let value = await codiad.settings.get_option( key ); - console.log( key, value, i, $( item ).attr( 'data-setting' ) ); + //console.log( key, value, i, $( item ).attr( 'data-setting' ) ); if ( value != null && value != undefined ) {