From 866bd7ca62b61dd6b3bcd33989a3eb06002842b7 Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Sat, 6 Jan 2018 23:59:01 -0600 Subject: [PATCH] Return the fallback background from BackgroundManager.random_bg() when we don't have any backgrounds to choose from. --- themes/default/js/greeter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/default/js/greeter.js b/themes/default/js/greeter.js index 2a3aac8..76df009 100644 --- a/themes/default/js/greeter.js +++ b/themes/default/js/greeter.js @@ -49,7 +49,7 @@ function is_empty( value ) { return value.length === 0; } - return ['', null, 'null', undefined, 'undefined'].includes( value ); + return ['', null, 'null', undefined, 'undefined', false, 'false'].includes( value ); } @@ -288,7 +288,7 @@ class BackgroundManager { let random_bg; if ( is_empty( _config.background_images ) ) { - return ''; + return 'img/fallback_bg.jpg'; } random_bg = Math.floor( Math.random() * _config.background_images.length );