From 8886e8c3fcc51f19a7c936d094e50c6cc1912cb1 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Wed, 2 Sep 2015 15:44:51 -0700 Subject: [PATCH] Only try to decrement gesture dependency counter if dependency exists Fixes #2397 --- src/standard/gestures.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/standard/gestures.html b/src/standard/gestures.html index c87401e7d3..132abb556e 100644 --- a/src/standard/gestures.html +++ b/src/standard/gestures.html @@ -334,9 +334,9 @@ if (gd && gd[name]) { gd[name] = (gd[name] || 1) - 1; gd._count = (gd._count || 1) - 1; - } - if (gd._count === 0) { - node.removeEventListener(dep, this.handleNative); + if (gd._count === 0) { + node.removeEventListener(dep, this.handleNative); + } } } }