Fixed set container for dangling stage, related to #510

This commit is contained in:
Haochen Wu
2019-06-08 22:13:29 -07:00
parent a4650e310d
commit 307dfcc911
2 changed files with 15 additions and 1 deletions

View File

@@ -190,7 +190,9 @@ export class Stage extends Container<BaseLayer> {
}
this._setAttr(CONTAINER, container);
if (this.content) {
this.content.parentElement.removeChild(this.content);
if (this.content.parentElement) {
this.content.parentElement.removeChild(this.content);
}
container.appendChild(this.content);
}
return this;