diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 64e4e8596..a54cfa26f 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -44,7 +44,7 @@ const context = await esbuild.context({ plugins: [ sassPlugin(), esbuildSvelte({ - compilerOptions: { css: true, dev: true }, + compilerOptions: { css: true, dev: !prod }, preprocess: sveltePreprocess() }) ] diff --git a/src/parser/parser.ts b/src/parser/parser.ts index 583cc81be..da8ee3a53 100644 --- a/src/parser/parser.ts +++ b/src/parser/parser.ts @@ -41,14 +41,12 @@ export function getListItemsUnderHeading( }); } -// todo: this belongs to metadata-utils export function getHeadingByText(metadata: CachedMetadata, text: string) { const { headings = [] } = metadata; return headings?.find((h) => h.heading === text); } -// todo: we don't need this, delete it export function createTask({ line, completeContent, diff --git a/src/service/dataview-facade.ts b/src/service/dataview-facade.ts index be8d50a5d..07c1ffe94 100644 --- a/src/service/dataview-facade.ts +++ b/src/service/dataview-facade.ts @@ -60,7 +60,7 @@ export function sTaskToTask(sTask: STask, day: Moment): Task { }, }); - const durationMinutes = endTime + const durationMinutes = endTime?.isAfter(startTime) ? getDiffInMinutes(endTime, startTime) : undefined;