mirror of
https://github.com/xevidos/codiad.git
synced 2024-12-22 13:52:16 +01:00
Fixed issue where settings would not load after update.
This commit is contained in:
parent
08aab5dfb6
commit
eb9d51e9be
2 changed files with 6 additions and 5 deletions
|
@ -334,17 +334,18 @@
|
||||||
$.each( options, async function( idx, key ) {
|
$.each( options, async function( idx, key ) {
|
||||||
|
|
||||||
let localValue = await codiad.settings.get_option( 'codiad.' + 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) {
|
$.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');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -187,7 +187,7 @@
|
||||||
let key = await $( item ).attr( 'data-setting' );
|
let key = await $( item ).attr( 'data-setting' );
|
||||||
let value = await codiad.settings.get_option( key );
|
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 ) {
|
if ( value != null && value != undefined ) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue