Fix location of _enabled assignment (#818)

This commit is contained in:
toasted-nutbread 2020-09-12 19:42:09 -04:00 committed by GitHub
parent 9f1753a565
commit fcb8806717
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {