diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index 60997896f9..0c83e2520e 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -69,7 +69,6 @@ // Stop unnecessary rendering const memoBlock = memo(block) - const memoEnvVariables = memo($environment.variables) const rowTriggers = [ TriggerStepID.ROW_UPDATED, @@ -91,7 +90,6 @@ let insertAtPos, getCaretPosition let stepLayouts = {} - $: memoEnvVariables.set($environment.variables) $: memoBlock.set(block) $: filters = lookForFilters(schemaProperties) diff --git a/packages/builder/src/stores/builder/automations.js b/packages/builder/src/stores/builder/automations.js index 133cb335a1..78328f9a38 100644 --- a/packages/builder/src/stores/builder/automations.js +++ b/packages/builder/src/stores/builder/automations.js @@ -192,7 +192,7 @@ const automationActions = store => ({ * @returns {Array} - all bindings on the path to this step */ getPathBindings: id => { - const block = get(store).blocks[id] + const block = get(selectedAutomation).blockRefs[id] const bindings = store.actions.getAvailableBindings( block, get(selectedAutomation).data @@ -266,7 +266,7 @@ const automationActions = store => ({ } // Registered blocks - const blocks = get(store).blocks + const blocks = get(selectedAutomation).blockRefs // Get all preceeding steps, including the trigger // Filter out the target step as we don't want to include itself @@ -638,7 +638,7 @@ const automationActions = store => ({ newAutomation = cloneDeep(automation) newAutomation.definition.trigger = block } else { - const pathToStep = get(automationStore).blocks[block.id].pathTo + const pathToStep = get(selectedAutomation).blockRefs[block.id].pathTo newAutomation = automationStore.actions.updateStep( pathToStep, automation,