Skip to content

Commit

Permalink
[form-builder] Guard against this._editorNode being null (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge authored Feb 5, 2018
1 parent 862be5a commit 4ae5281
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class FormBuilderBlock extends React.Component {
}

handleSelectionChange = event => {
if (!this._editorNode.contains(event.target)) {
if (!this._editorNode || !this._editorNode.contains(event.target)) {
return
}
const selection = document.getSelection()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default class FormBuilderInline extends React.Component {
}

handleSelectionChange = event => {
if (!this._editorNode.contains(event.target)) {
if (!this._editorNode || !this._editorNode.contains(event.target)) {
return
}
const selection = document.getSelection()
Expand Down

0 comments on commit 4ae5281

Please sign in to comment.