From c451f54289b70c5a033c2566fe7f1748059633c0 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 14 Jun 2021 12:18:54 +0100 Subject: [PATCH] Fix crash when removing data bindings from an object which contains a null value --- packages/builder/src/builderStore/dataBinding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 5ce8e407c1..6d7cad1cd0 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -333,7 +333,7 @@ const buildFormSchema = component => { */ export function removeBindings(obj) { for (let [key, value] of Object.entries(obj)) { - if (typeof value === "object") { + if (value && typeof value === "object") { obj[key] = removeBindings(value) } else if (typeof value === "string") { obj[key] = value.replace(CAPTURE_HBS_TEMPLATE, "Invalid binding")