From 0dd8a30500e5ef3224ac9c1547593a13900a5f77 Mon Sep 17 00:00:00 2001 From: viclm Date: Thu, 3 Nov 2016 17:32:16 +0800 Subject: [PATCH] remove unnecessary condition which blocks gc --- vue-touch.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vue-touch.js b/vue-touch.js index ee1abaf..352ff50 100644 --- a/vue-touch.js +++ b/vue-touch.js @@ -102,10 +102,8 @@ if (this.handler) { this.mc.off(this.arg, this.handler) } - if (!Object.keys(this.mc.handlers).length) { - this.mc.destroy() - this.el.hammer = null - } + this.mc.destroy() + this.el.hammer = null } })