diff --git a/packages/builder/src/components/common/bindings/BindingPanel.svelte b/packages/builder/src/components/common/bindings/BindingPanel.svelte index 04dc92f920..7c863f4beb 100644 --- a/packages/builder/src/components/common/bindings/BindingPanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingPanel.svelte @@ -31,7 +31,7 @@ import { capitalise } from "@/helpers" import { Utils, JsonFormatter } from "@budibase/frontend-core" import { licensing } from "@/stores/portal" - import { BindingMode, EditorMode, SidePanel } from "@budibase/types" + import { BindingMode, SidePanel } from "@budibase/types" import type { EnrichedBinding, BindingCompletion, @@ -64,8 +64,8 @@ let getCaretPosition: CaretPositionFn | undefined let insertAtPos: InsertAtPositionFn | undefined let targetMode: BindingMode | null = null - let expressionResult: string | undefined | null - let expressionError: string | undefined | null + let expressionResult: string | undefined + let expressionError: string | undefined let evaluating = false $: useSnippets = allowSnippets && !$licensing.isFreePlan @@ -155,7 +155,7 @@ const debouncedEval = Utils.debounce( (expression: string | null, context: any, snippets: Snippet[]) => { try { - expressionError = null + expressionError = undefined expressionResult = processStringSync( expression || "", { @@ -167,7 +167,7 @@ } ) } catch (err: any) { - expressionResult = null + expressionResult = undefined expressionError = err } evaluating = false diff --git a/packages/builder/src/components/common/bindings/EvaluationSidePanel.svelte b/packages/builder/src/components/common/bindings/EvaluationSidePanel.svelte index 10b3f85176..91d986f0f6 100644 --- a/packages/builder/src/components/common/bindings/EvaluationSidePanel.svelte +++ b/packages/builder/src/components/common/bindings/EvaluationSidePanel.svelte @@ -5,8 +5,8 @@ import { fade } from "svelte/transition" import { UserScriptError } from "@budibase/string-templates" - export let expressionResult - export let expressionError + export let expressionResult: string | undefined = undefined + export let expressionError: string | undefined = undefined export let evaluating = false export let expression: string | null = null