From 97f33d292da9847c0f98a29c2d0dadc84f85242c Mon Sep 17 00:00:00 2001 From: Danny Larsen Date: Wed, 9 Aug 2017 20:41:29 +0200 Subject: [PATCH] Bug fix for null parent (#3342) --- lib/timeline/component/item/Item.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/timeline/component/item/Item.js b/lib/timeline/component/item/Item.js index 9dd4e055..551ffc35 100644 --- a/lib/timeline/component/item/Item.js +++ b/lib/timeline/component/item/Item.js @@ -64,7 +64,10 @@ Item.prototype.setData = function(data) { if (groupChanged && this.parent != null) { this.parent.itemSet._moveToGroup(this, data.group); } - this.parent.stackDirty = true; + + if (this.parent) { + this.parent.stackDirty = true; + } var subGroupChanged = data.subgroup != undefined && this.data.subgroup != data.subgroup; if (subGroupChanged && this.parent != null) {