avoid dashboard js crash when accessibility app is not installed

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
This commit is contained in:
Julien Veyssier 2020-12-10 13:43:03 +01:00 committed by npmbuildbot-nextcloud[bot]
parent 4a51875a73
commit ec02f6f3a5
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,7 @@ import prefixWithBaseUrl from './prefixWithBaseUrl'
export default (background, time = 0) => {
if (background === 'default') {
if (window.OCA.Accessibility.theme === 'dark') {
if (window.OCA.Accessibility?.theme === 'dark') {
return prefixWithBaseUrl('eduardo-neves-pedra-azul.jpg')
}
return prefixWithBaseUrl('kamil-porembinski-clouds.jpg')