mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix null checks
This commit is contained in:
parent
1548f21901
commit
c5a8c6c67b
2 changed files with 26 additions and 26 deletions
|
@ -12,7 +12,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function enableAutoLogin(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
this.set('enableAutoLogin', val.toString());
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function enableSystemExternalPlayers(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
this.set('enableSystemExternalPlayers', val.toString());
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ import events from 'events';
|
|||
|
||||
export function enableAutomaticBitrateDetection(isInNetwork, mediaType, val) {
|
||||
var key = 'enableautobitratebitrate-' + mediaType + '-' + isInNetwork;
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
if (isInNetwork && mediaType === 'Audio') {
|
||||
val = true;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ import events from 'events';
|
|||
|
||||
export function maxStreamingBitrate(isInNetwork, mediaType, val) {
|
||||
var key = 'maxbitrate-' + mediaType + '-' + isInNetwork;
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
if (isInNetwork && mediaType === 'Audio') {
|
||||
// nothing to do, this is always a max value
|
||||
} else {
|
||||
|
@ -63,7 +63,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function maxStaticMusicBitrate(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
this.set('maxStaticMusicBitrate', val);
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function maxChromecastBitrate(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
this.set('chromecastBitrate1', val);
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function syncOnlyOnWifi(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
this.set('syncOnlyOnWifi', val.toString());
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function syncPath(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
this.set('syncPath', val);
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function cameraUploadServers(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
this.set('cameraUploadServers', val.join(','));
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function runAtStartup(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
this.set('runatstartup', val.toString());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue