Skip to content

Commit

Permalink
Change Widget#setContainer() to append only if container is an inst…
Browse files Browse the repository at this point in the history
…ance of `Node`
  • Loading branch information
lahmatiy committed Mar 5, 2021
1 parent a7e2dcb commit 638750c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Fixed `source` view supported syntaxes to list modes with no mime
- Fixed editor's hint popup positioning when widget is not fit into the page bounds
- Added `options` parameter for `loadDataFromUrl()` which is passing as is into `fetch()` as second argument
- Changed `Widget#setContainer()` to append only if container is an instance of `Node`

## 1.0.0-beta.57 (04-03-2021)

Expand Down
6 changes: 5 additions & 1 deletion src/widget/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,11 @@ export default class Widget extends Emitter {
}

setContainer(container) {
container.append(this.dom.wrapper);
if (container instanceof Node) {
container.append(this.dom.wrapper);
} else {
this.dom.wrapper.remove();
}
}

disposeDom() {
Expand Down

0 comments on commit 638750c

Please sign in to comment.