Browse Source

Return the fallback background from BackgroundManager.random_bg() when we don't have any backgrounds to choose from.

sisyphus
Dustin Falgout 7 years ago
parent
commit
866bd7ca62
No known key found for this signature in database
GPG Key ID: AEA529BF122902E5
  1. 4
      themes/default/js/greeter.js

4
themes/default/js/greeter.js vendored

@ -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 );

Loading…
Cancel
Save