X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app.js;h=21bdbb995f47392582a9849f83d55c51cffbaa30;hb=b4de52de8977f21fef7468c1a9c706b33c1b2dd5;hp=0cd75b53724263cf7c0d3d5f1fb959038db226a2;hpb=56c69e0d6bd7265afec6cd66a4875ebf6357ea7d;p=github%2Fbastienwirtz%2Fhomer.git diff --git a/app.js b/app.js index 0cd75b5..21bdbb9 100644 --- a/app.js +++ b/app.js @@ -20,12 +20,13 @@ const app = new Vue({ this.checkOffline(); try { this.config = await this.getConfig(); + document.title = this.config.title + ' | Homer'; } catch (error) { this.offline = true; } // Look for a new message if an endpoint is provided. - if (this.config.message.url) { + if (this.config.message && this.config.message.url) { this.getMessage(this.config.message.url).then(function(message){ // keep the original config value if no value is provided by the endpoint for (const prop of ['title','style','content']) {