Added check on window.Accessibility

It crash the Dashboard when the Accessibility module is not presetn

Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
This commit is contained in:
Avior 2020-11-30 15:51:10 +01:00 committed by npmbuildbot-nextcloud[bot]
parent 3a8bd38ca4
commit e0e61b8658
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

@ -28,7 +28,7 @@ export default (background, time = 0, themingDefaultBackground = '') => {
if (themingDefaultBackground && themingDefaultBackground !== 'backgroundColor') {
return generateUrl('/apps/theming/image/background') + '?v=' + window.OCA.Theming.cacheBuster
}
if (window.OCA.Accessibility.theme === 'dark') {
if (window.OCA.Accessibility && window.OCA.Accessibility.theme === 'dark') {
return prefixWithBaseUrl('eduardo-neves-pedra-azul.jpg')
}
return prefixWithBaseUrl('kamil-porembinski-clouds.jpg')