Disable live binding eval when no context is provided

This commit is contained in:
Andrew Kingston 2024-02-27 12:55:48 +00:00
parent 6bb3c76d1d
commit 9450c5b770
2 changed files with 8 additions and 4 deletions

View File

@ -69,7 +69,9 @@
$: drawerContext?.modal.subscribe(val => (drawerIsModal = val)) $: drawerContext?.modal.subscribe(val => (drawerIsModal = val))
$: editorTabs = allowJS ? [Modes.Text, Modes.JavaScript] : [Modes.Text] $: editorTabs = allowJS ? [Modes.Text, Modes.JavaScript] : [Modes.Text]
$: sideTabs = [SidePanels.Evaluation, SidePanels.Bindings] $: sideTabs = context
? [SidePanels.Evaluation, SidePanels.Bindings]
: [SidePanels.Bindings]
$: enrichedBindings = enrichBindings(bindings, context) $: enrichedBindings = enrichBindings(bindings, context)
$: usingJS = mode === Modes.JavaScript $: usingJS = mode === Modes.JavaScript
$: editorMode = $: editorMode =

View File

@ -1,9 +1,8 @@
<script> <script>
import groupBy from "lodash/fp/groupBy" import groupBy from "lodash/fp/groupBy"
import { convertToJS, processStringSync } from "@budibase/string-templates" import { convertToJS } from "@budibase/string-templates"
import { Input, Layout, ActionButton, Icon, Popover } from "@budibase/bbui" import { Input, Layout, Icon, Popover } from "@budibase/bbui"
import { handlebarsCompletions } from "constants/completions" import { handlebarsCompletions } from "constants/completions"
import formatHighlight from "json-format-highlight"
export let addHelper export let addHelper
export let addBinding export let addBinding
@ -72,6 +71,9 @@
} }
const showBindingPopover = (binding, target) => { const showBindingPopover = (binding, target) => {
if (!context) {
return
}
stopHidingPopover() stopHidingPopover()
popoverAnchor = target popoverAnchor = target
hoverTarget = { hoverTarget = {