Fix sonarjs no-collapsible-if

This commit is contained in:
Bill Thornton 2022-10-03 14:22:02 -04:00
parent ccdbf0bfc3
commit 1f4e65822b
33 changed files with 330 additions and 473 deletions

View file

@ -324,11 +324,9 @@ if (browser.mobile || browser.tv) {
browser.slow = true;
}
if (typeof document !== 'undefined') {
/* eslint-disable-next-line compat/compat */
if (('ontouchstart' in window) || (navigator.maxTouchPoints > 0)) {
browser.touch = true;
}
/* eslint-disable-next-line compat/compat */
if (typeof document !== 'undefined' && ('ontouchstart' in window) || (navigator.maxTouchPoints > 0)) {
browser.touch = true;
}
browser.keyboard = hasKeyboard(browser);