Fixed issue where settings would not load after update.

This commit is contained in:
xevidos 2019-01-15 11:01:55 -05:00
parent 08aab5dfb6
commit eb9d51e9be
2 changed files with 6 additions and 5 deletions

View File

@ -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');
}
});
},

View File

@ -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 ) {