Fix sonarjs prefer-single-boolean-return
This commit is contained in:
parent
bb86ab7f27
commit
b426b6e2bf
18 changed files with 52 additions and 187 deletions
|
@ -19,25 +19,14 @@ function isTv() {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (isWeb0s()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return isWeb0s();
|
||||
}
|
||||
|
||||
function isWeb0s() {
|
||||
const userAgent = navigator.userAgent.toLowerCase();
|
||||
|
||||
if (userAgent.indexOf('netcast') !== -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (userAgent.indexOf('web0s') !== -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return userAgent.indexOf('netcast') !== -1
|
||||
|| userAgent.indexOf('web0s') !== -1;
|
||||
}
|
||||
|
||||
function isMobile(userAgent) {
|
||||
|
@ -84,11 +73,7 @@ function hasKeyboard(browser) {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (browser.tv) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return !!browser.tv;
|
||||
}
|
||||
|
||||
function iOSversion() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue