1
0
Fork 0
mirror of synced 2024-09-30 09:07:25 +13:00

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

This commit is contained in:
Andrew Kingston 2021-06-14 12:18:54 +01:00
parent 27009438c8
commit 61912fd7cd

View file

@ -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")