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
|
@ -84,7 +84,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function enableCinemaMode(val) {
|
||||
if (val != null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('enableCinemaMode', val.toString(), false);
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function enableNextVideoInfoOverlay(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('enableNextVideoInfoOverlay', val.toString());
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function enableThemeSongs(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('enableThemeSongs', val.toString(), false);
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function enableThemeVideos(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('enableThemeVideos', val.toString(), false);
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function enableFastFadein(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('fastFadein', val.toString(), false);
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function enableBackdrops(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('enableBackdrops', val.toString(), false);
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function language(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('language', val.toString(), false);
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function dateTimeLocale(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('datetimelocale', val.toString(), false);
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function skipBackLength(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('skipBackLength', val.toString());
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function skipForwardLength(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('skipForwardLength', val.toString());
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function dashboardTheme(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('dashboardTheme', val);
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function skin(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('skin', val, false);
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function theme(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('appTheme', val, false);
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function screensaver(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('screensaver', val, false);
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function libraryPageSize(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('libraryPageSize', parseInt(val, 10), false);
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ import events from 'events';
|
|||
}
|
||||
|
||||
export function soundEffects(val) {
|
||||
if (val !== undefined || null) {
|
||||
if (val !== undefined || val !== null) {
|
||||
return this.set('soundeffects', val, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue