prevent image error on old browsers

This commit is contained in:
Simon Vieille 2020-04-16 12:36:30 +02:00
parent 8b20b11ce2
commit f4ec00c9f7
Signed by: deblan
GPG Key ID: 03383D15A1D31745
1 changed files with 5 additions and 1 deletions

View File

@ -67,10 +67,14 @@ export default {
const ncLogo = document.querySelector('#nextcloud .logo')
if (ncLogo) {
this.logo = window.getComputedStyle(ncLogo, null)
const url = window.getComputedStyle(ncLogo, null)
.getPropertyValue('background-image')
.replace('url("', '')
.replace('")', '')
if (url && url !== 'none') {
this.logo = url
}
}
},
},