From ed67c2c97b1ffda31f1404a2916f1f889bbfadac Mon Sep 17 00:00:00 2001 From: Pavel Reznikov Date: Sun, 1 Mar 2015 22:20:34 -0800 Subject: [PATCH] update gridstack --- gridstack.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gridstack.js b/gridstack.js index a5caa88..7a95818 100644 --- a/gridstack.js +++ b/gridstack.js @@ -368,7 +368,8 @@ this.container.addClass(this.opts._class); this._styles = Utils.create_stylesheet(); - this._styles._max = 0; + if (this._styles != null) + this._styles._max = 0; this.grid = new GridStackEngine(this.opts.width, function (nodes) { var max_height = 0; @@ -449,6 +450,10 @@ }; GridStack.prototype._update_styles = function (max_height) { + if (this._styles == null) { + return; + } + var prefix = '.' + this.opts._class + ' .' + this.opts.item_class; if (typeof max_height == 'undefined') {