mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Fix bug if setting is missing
This commit is contained in:
parent
d57d5e983d
commit
baebfe9630
2 changed files with 5 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "folder-notes",
|
||||
"name": "Folder notes",
|
||||
"version": "1.5.6",
|
||||
"version": "1.5.7",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.",
|
||||
"author": "Lost Paul",
|
||||
|
|
|
|||
|
|
@ -365,8 +365,10 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
}
|
||||
|
||||
async loadSettings() {
|
||||
this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());
|
||||
const overview = await (this.loadData() as any).defaultOverview;
|
||||
const data = await this.loadData();
|
||||
this.settings = Object.assign({}, DEFAULT_SETTINGS, data);
|
||||
if (!data) { return; }
|
||||
const overview = (data as any).defaultOverview;
|
||||
if (!overview) { return; }
|
||||
this.settings.defaultOverview = Object.assign({}, DEFAULT_SETTINGS.defaultOverview, overview);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue