Browse Source

Fix crash when removing data bindings from an object which contains a null value

gh-pages
Andrew Kingston 5 years ago
parent
commit
c451f54289
  1. 2
      packages/builder/src/builderStore/dataBinding.js

2
packages/builder/src/builderStore/dataBinding.js

@ -333,7 +333,7 @@ const buildFormSchema = component => {
*/ */
export function removeBindings(obj) { export function removeBindings(obj) {
for (let [key, value] of Object.entries(obj)) { for (let [key, value] of Object.entries(obj)) {
if (typeof value === "object") { if (value && typeof value === "object") {
obj[key] = removeBindings(value) obj[key] = removeBindings(value)
} else if (typeof value === "string") { } else if (typeof value === "string") {
obj[key] = value.replace(CAPTURE_HBS_TEMPLATE, "Invalid binding") obj[key] = value.replace(CAPTURE_HBS_TEMPLATE, "Invalid binding")

Loading…
Cancel
Save