From fefb236e6881d41bf0c89686ec454db61ef3f309 Mon Sep 17 00:00:00 2001 From: DominikSerafin Date: Tue, 11 Sep 2018 21:52:18 +0200 Subject: [PATCH] Cleanup & bump version --- package.json | 2 +- vuebar.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b8182e3..ba29aa0 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "Vue directive for custom scrollbar that uses native scroll behavior. Lightweight, performant and without dependencies.", "author": "Dominik Serafin ", "license": "MIT", - "version": "0.0.19", + "version": "0.0.20", "private": false, "repository": { "type": "git", diff --git a/vuebar.js b/vuebar.js index cb64363..dffd3d4 100644 --- a/vuebar.js +++ b/vuebar.js @@ -590,11 +590,8 @@ function destroyScrollbar(el, options){ var options = options ? options : {}; var state = getState(el); + if (!state) return; - if (!state) { - return; - } - // clear events state.dragger.removeEventListener('mousedown', state.barMousedown, 0); state.el2.removeEventListener('scroll', state.scrollHandler, 0);