fix for #65
This commit is contained in:
parent
54c0cadaa0
commit
ccfb0fa9ee
9 changed files with 49 additions and 16 deletions
|
|
@ -212,3 +212,9 @@ export interface CreateNoteOptions {
|
|||
attachFile?: TFile,
|
||||
openNote?: boolean,
|
||||
}
|
||||
|
||||
export function migrateObject<T extends object>(object: T, oldData: any, defaultData: T): void {
|
||||
for (const key in object) {
|
||||
object[key] = oldData.hasOwnProperty(key) ? oldData[key] : defaultData[key];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue