From 9bb3a79a963854960a971d605a41f25169aa5b07 Mon Sep 17 00:00:00 2001 From: Louy Alakkad Date: Mon, 30 Jun 2014 16:55:15 +0300 Subject: [PATCH] Calling "destroy" shouldn't create an instance Fixes #87 --- jquery.slimscroll.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jquery.slimscroll.js b/jquery.slimscroll.js index 8f813ee..a4d195c 100644 --- a/jquery.slimscroll.js +++ b/jquery.slimscroll.js @@ -142,6 +142,13 @@ return; } + else if ($.isPlainObject(options)) + { + if ('destroy' in options) + { + return; + } + } // optionally set height to the parent's height o.height = (options.height == 'auto') ? me.parent().height() : options.height;