From 6a9fea9174632a90524e6ca2e5ea25096b9739ee Mon Sep 17 00:00:00 2001 From: Danielo Rodriguez Date: Wed, 25 Oct 2023 17:26:14 +0200 Subject: [PATCH] chore: todos --- src/main.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 18b6ee4a..33c5e949 100644 --- a/src/main.ts +++ b/src/main.ts @@ -141,10 +141,12 @@ export default class ModalFormPlugin extends Plugin { return leaf; } + // TODO: extract the migration logic to a separate function and test it + // TODO: collect actual migration events to decide if we need to migrate or not rather than this naive approach async getSettings(): Promise { const data = await this.loadData(); - const [migrationIsNeeded, settings] = pipe(data, - parseSettings, + const [migrationIsNeeded, settings] = pipe( + parseSettings(data), E.map((settings): [boolean, ModalFormSettings] => { const migrationIsNeeded = settings.formDefinitions.some(formNeedsMigration); const { right: formDefinitions, left: errors } = A.partitionMap(migrateToLatest)(settings.formDefinitions);