Skip to content

Commit

Permalink
fix: Prevent drag and drop from accessing prop when undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
vsgoulart authored and Skaiir committed Jul 30, 2024
1 parent 12f4d5e commit 9384858
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/form-js-editor/src/features/dragging/Dragging.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export class Dragging {
let targetParentId;

if (formFieldNode) {
formField = this._formFieldRegistry.get(formFieldNode.dataset.id);
columns = (formField.layout || {}).columns;
formField = this._formFieldRegistry.get(formFieldNode.dataset.id) || { layout: {} };
columns = formField.layout.columns;

// (1) check for row constraints
if (isRow(target)) {
Expand Down

0 comments on commit 9384858

Please sign in to comment.