From 87e4849b2e8323d7484f11d31f38f4517bb9f635 Mon Sep 17 00:00:00 2001 From: Donal Mac An Ri Date: Sat, 21 Jan 2023 22:41:24 -0330 Subject: [PATCH] fix: timeframe always being reset to Today in widget editor modal on save --- .../dashboard2/widget/widget-editor/widget-editor-modal.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/dashboard2/widget/widget-editor/widget-editor-modal.svelte b/src/domains/dashboard2/widget/widget-editor/widget-editor-modal.svelte index fa74b72..fa9de30 100644 --- a/src/domains/dashboard2/widget/widget-editor/widget-editor-modal.svelte +++ b/src/domains/dashboard2/widget/widget-editor/widget-editor-modal.svelte @@ -83,7 +83,7 @@ import { PluginStore } from "../../../plugins/PluginStore"; const saveWidget = async () => { try { - if(![...activeType.requires, ...activeType.optional].indexOf('timeframe')) { + if([...activeType.requires, ...activeType.optional].indexOf('timeframe') === -1) { editingWidget.timeRange = undefined; }