Pop storyview: fix bug where targetElement is null (#4143)

This commit is contained in:
Simon Huber
2019-08-02 08:51:16 +01:00
committed by Jeremy Ruston
parent 64fe260f4d
commit fab67a463b
+1 -1
View File
@@ -72,7 +72,7 @@ PopStoryView.prototype.remove = function(widget) {
var targetElement = widget.findFirstDomNode(),
duration = $tw.utils.getAnimationDuration(),
removeElement = function() {
if(targetElement.parentNode) {
if(targetElement && targetElement.parentNode) {
widget.removeChildDomNodes();
}
};