Skip to content

Commit

Permalink
fix: add in check for .length to ensure we are within the stage-wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasnetau committed Jul 1, 2024
1 parent c180c9f commit d9695cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function FormBuilder(opts, element, $) {
return false
}

if ($(ui.item).closest('.stage-wrap') && $(ui.item).closest(rowWrapperClassSelector).length === 0) {
if ($(ui.item).closest('.stage-wrap').length && $(ui.item).closest(rowWrapperClassSelector).length === 0) {
h.doCancel = true
processControl(ui.item)
} else {
Expand Down

0 comments on commit d9695cc

Please sign in to comment.