From bea07f48290d0f1f050d3e54d387f638c260c5e9 Mon Sep 17 00:00:00 2001 From: Valentin Serra Date: Tue, 6 Aug 2024 11:35:14 +0200 Subject: [PATCH] revert: prevent drag and drop from accessing prop when undefined Reverts #1219 --- packages/form-js-editor/src/features/dragging/Dragging.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/form-js-editor/src/features/dragging/Dragging.js b/packages/form-js-editor/src/features/dragging/Dragging.js index 2ba342048..bf937002b 100644 --- a/packages/form-js-editor/src/features/dragging/Dragging.js +++ b/packages/form-js-editor/src/features/dragging/Dragging.js @@ -78,8 +78,8 @@ export class Dragging { let targetParentId; if (formFieldNode) { - formField = this._formFieldRegistry.get(formFieldNode.dataset.id) || { layout: {} }; - columns = formField.layout.columns; + formField = this._formFieldRegistry.get(formFieldNode.dataset.id); + columns = (formField.layout || {}).columns; // (1) check for row constraints if (isRow(target)) {