Skip to content

Commit

Permalink
Guard against parentNode being undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-sherman committed Sep 26, 2019
1 parent aee18dc commit c2ecf4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dom_components/view/ComponentTextView.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ export default ComponentView.extend({

while (el) {
el.draggable = enable ? !1 : !0;
// Note: el.parentNode is sometimes null here
el = el.parentNode;
el.tagName == 'BODY' && (el = 0);
el && el.tagName == 'BODY' && (el = 0);
}
}
}
Expand Down

0 comments on commit c2ecf4b

Please sign in to comment.