Skip to content

Commit

Permalink
Cleanup if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube committed Apr 10, 2024
1 parent e947ff6 commit 50f4d7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ext/js/language/text-scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,10 @@ export class TextScanner extends EventDispatcher {
if (!allowSearch) { return; }

const inputInfo = this._getMatchingInputGroupFromEvent('touch', 'touchEnd', e);
if (inputInfo === null || !((inputInfo.input !== null && inputInfo.input.scanOnTouchRelease) || (inputInfo.input !== null && inputInfo.input.scanOnTouchTap && this._touchTapValid))) { return; }
void this._searchAtFromTouchEnd(x, y, inputInfo);
if (inputInfo === null || inputInfo.input === null) { return; }
if (inputInfo.input.scanOnTouchRelease || (inputInfo.input.scanOnTouchTap && this._touchTapValid)) {
void this._searchAtFromTouchEnd(x, y, inputInfo);
}
}

/**
Expand Down

0 comments on commit 50f4d7d

Please sign in to comment.