add test before insert nextcloud logo

This commit is contained in:
Simon Vieille 2020-04-09 14:19:10 +02:00
parent 299abe5e96
commit 8d2818150c
Signed by: deblan
GPG Key ID: 03383D15A1D31745
1 changed files with 8 additions and 4 deletions

View File

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