Don't reset settings on failed extconfpatches application
This commit is contained in:
parent
a92f5fc2a1
commit
f994617d44
@ -186,7 +186,6 @@ class Settings {
|
||||
}
|
||||
|
||||
// apply all remaining patches
|
||||
try {
|
||||
this.logger?.log('info', 'settings', `[Settings::applySettingsPatches] There are ${patches.length - index} settings patches to apply`);
|
||||
while (index < patches.length) {
|
||||
const updateFn = patches[index].updateFn;
|
||||
@ -202,17 +201,11 @@ class Settings {
|
||||
updateFn(this.active, this.getDefaultSettings());
|
||||
} catch (e) {
|
||||
this.logger?.log('error', 'settings', '[Settings::applySettingsPatches] Failed to execute update function. Keeping settings object as-is. Error:', e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Failed to upgrade settings.', e);
|
||||
this.setActive(this.getDefaultSettings());
|
||||
this.save();
|
||||
}
|
||||
}
|
||||
|
||||
async init() {
|
||||
|
Loading…
Reference in New Issue
Block a user