diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index d0cffbbb..f4e04c48 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -265,7 +265,7 @@ Core.prototype.setOptions = function (options) { onRender: options.drawPoints }; } - + if ('hiddenDates' in this.options) { DateUtil.convertHiddenOptions(this.options.moment, this.body, this.options.hiddenDates); } @@ -900,8 +900,10 @@ Core.prototype._stopAutoResize = function () { } // remove event listener on window.resize - util.removeEventListener(window, 'resize', this._onResize); - this._onResize = null; + if (this._onResize) { + util.removeEventListener(window, 'resize', this._onResize); + this._onResize = null; + } }; /**