Merge branch 'development' into 'master'

Fixed issue where settings would not load after update.

See merge request xevidos/codiad!23
This commit is contained in:
Isaac Brown 2019-01-15 11:02:30 -05:00
commit 325f971572
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 ) {
_this.settings[key] = (localValue == 'true').toString();
let localValue = await codiad.settings.get_option( 'codiad.' + key );
if ( localValue != null ) {
_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 ) {