From 48a0c66972af77360c72e38303de6958b89a392d Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Fri, 30 Apr 2021 19:17:00 +0100 Subject: [PATCH] Fixing cypress tests. --- .../builder/src/builderStore/dataBinding.js | 6 +- .../bindings/DrawerBindableInput.svelte | 8 +- .../src/components/common/bindings/utils.js | 5 +- packages/server/yarn.lock | 53 +- packages/worker/yarn.lock | 650 +----------------- 5 files changed, 21 insertions(+), 701 deletions(-) diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index c2c1a0ff71..b6844c0208 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -16,7 +16,7 @@ const CAPTURE_HBS_TEMPLATE = /{{[\S\s]*?}}/g export const getBindableProperties = (asset, componentId) => { const contextBindings = getContextBindings(asset, componentId) const userBindings = getUserBindings() - const urlBindings = getUrlBindings(asset, componentId) + const urlBindings = getUrlBindings(asset) return [...contextBindings, ...userBindings, ...urlBindings] } @@ -334,7 +334,7 @@ export function removeBindings(obj) { * this makes sure that doesn't happen. */ function shouldReplaceBinding(currentValue, from, convertTo) { - if (!currentValue.includes(from)) { + if (!currentValue?.includes(from)) { return false } if (convertTo === "readableBinding") { @@ -349,7 +349,7 @@ function shouldReplaceBinding(currentValue, from, convertTo) { `"${fromNoSpaces}"`, `'${fromNoSpaces}'`, ] - return !invalids.find(invalid => noSpaces.includes(invalid)) + return !invalids.find(invalid => noSpaces?.includes(invalid)) } /** diff --git a/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte b/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte index 3f011a854e..e7723aba85 100644 --- a/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte +++ b/packages/builder/src/components/common/bindings/DrawerBindableInput.svelte @@ -1,16 +1,14 @@