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

View file

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