You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Desktop: Fixed default migration logic
This commit is contained in:
@ -226,6 +226,14 @@ describe('models/Setting', function() {
|
|||||||
expect(Setting.value('style.editor.contentMaxWidth')).toBe(600); // Changed
|
expect(Setting.value('style.editor.contentMaxWidth')).toBe(600); // Changed
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should skip values that are already set', (async () => {
|
||||||
|
await Setting.reset();
|
||||||
|
|
||||||
|
Setting.setValue('sync.target', 9);
|
||||||
|
Setting.applyDefaultMigrations();
|
||||||
|
expect(Setting.value('sync.target')).toBe(9); // Not changed
|
||||||
|
}));
|
||||||
|
|
||||||
it('should allow skipping default migrations', (async () => {
|
it('should allow skipping default migrations', (async () => {
|
||||||
await Setting.reset();
|
await Setting.reset();
|
||||||
|
|
||||||
|
@ -1457,7 +1457,7 @@ class Setting extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static isSet(key: string) {
|
public static isSet(key: string) {
|
||||||
return key in this.cache_;
|
return this.cache_.find(d => d.key === key);
|
||||||
}
|
}
|
||||||
|
|
||||||
static keyDescription(key: string, appType: AppType = null) {
|
static keyDescription(key: string, appType: AppType = null) {
|
||||||
|
Reference in New Issue
Block a user