File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import { MetaBindSettingTab } from 'packages/obsidian/src/settings/SettingsTab';
2525import { ObsidianNotePosition } from 'packages/obsidian/src/ObsidianNotePosition' ;
2626import { RenderChildType } from 'packages/core/src/config/APIConfigs' ;
2727import { areObjectsEqual } from 'packages/core/src/utils/Utils' ;
28+ import { log } from 'mathjs' ;
2829
2930export enum MetaBindBuild {
3031 DEV = 'dev' ,
@@ -342,10 +343,12 @@ export default class MetaBindPlugin extends Plugin implements IPlugin {
342343
343344 const loadedSettings = ( await this . loadData ( ) ) as MetaBindPluginSettings ;
344345
345- // @ts -expect-error TS2339 remove old config field
346- delete loadedSettings . inputTemplates ;
347- // @ts -expect-error TS2339 remove old config field
348- delete loadedSettings . useUsDateInputOrder ;
346+ if ( typeof loadedSettings === 'object' ) {
347+ // @ts -expect-error TS2339 remove old config field
348+ delete loadedSettings . inputTemplates ;
349+ // @ts -expect-error TS2339 remove old config field
350+ delete loadedSettings . useUsDateInputOrder ;
351+ }
349352
350353 this . settings = Object . assign ( { } , DEFAULT_SETTINGS , loadedSettings ) ;
351354
You can’t perform that action at this time.
0 commit comments