From fcb8806717fd4b099697c1247d4441e763575684 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 12 Sep 2020 19:42:09 -0400 Subject: Fix location of _enabled assignment (#818) --- ext/mixed/js/text-scanner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/mixed') diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js index 26c0687b..d2383af4 100644 --- a/ext/mixed/js/text-scanner.js +++ b/ext/mixed/js/text-scanner.js @@ -85,6 +85,8 @@ class TextScanner extends EventDispatcher { } setEnabled(enabled) { + this._enabled = enabled; + const value = enabled && this._isPrepared; if (this._enabledValue === value) { return; } @@ -95,7 +97,6 @@ class TextScanner extends EventDispatcher { this._preventNextClick = false; this._preventScroll = false; - this._enabled = enabled; this._enabledValue = value; if (value) { -- cgit v1.2.3