From 1548f21901b32612b8565e81a41e1399a22b0ebe Mon Sep 17 00:00:00 2001 From: MrTimscampi Date: Sat, 25 Apr 2020 12:17:27 +0200 Subject: [PATCH] Check for null or undefined in userSettings --- src/scripts/settings/userSettings.js | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/scripts/settings/userSettings.js b/src/scripts/settings/userSettings.js index 6f115eeffa..b2f1c69eda 100644 --- a/src/scripts/settings/userSettings.js +++ b/src/scripts/settings/userSettings.js @@ -93,7 +93,7 @@ import events from 'events'; } export function enableNextVideoInfoOverlay(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('enableNextVideoInfoOverlay', val.toString()); } @@ -102,7 +102,7 @@ import events from 'events'; } export function enableThemeSongs(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('enableThemeSongs', val.toString(), false); } @@ -111,7 +111,7 @@ import events from 'events'; } export function enableThemeVideos(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('enableThemeVideos', val.toString(), false); } @@ -120,7 +120,7 @@ import events from 'events'; } export function enableFastFadein(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('fastFadein', val.toString(), false); } @@ -129,7 +129,7 @@ import events from 'events'; } export function enableBackdrops(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('enableBackdrops', val.toString(), false); } @@ -138,7 +138,7 @@ import events from 'events'; } export function language(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('language', val.toString(), false); } @@ -146,7 +146,7 @@ import events from 'events'; } export function dateTimeLocale(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('datetimelocale', val.toString(), false); } @@ -154,7 +154,7 @@ import events from 'events'; } export function skipBackLength(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('skipBackLength', val.toString()); } @@ -162,7 +162,7 @@ import events from 'events'; } export function skipForwardLength(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('skipForwardLength', val.toString()); } @@ -170,7 +170,7 @@ import events from 'events'; } export function dashboardTheme(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('dashboardTheme', val); } @@ -178,7 +178,7 @@ import events from 'events'; } export function skin(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('skin', val, false); } @@ -186,7 +186,7 @@ import events from 'events'; } export function theme(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('appTheme', val, false); } @@ -194,7 +194,7 @@ import events from 'events'; } export function screensaver(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('screensaver', val, false); } @@ -202,7 +202,7 @@ import events from 'events'; } export function libraryPageSize(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('libraryPageSize', parseInt(val, 10), false); } @@ -216,7 +216,7 @@ import events from 'events'; } export function soundEffects(val) { - if (val != null) { + if (val !== undefined || null) { return this.set('soundeffects', val, false); }