Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Commit

Permalink
Removing old comment and adding default title (Closes #52)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Gaunt authored and addyosmani committed Nov 24, 2015
1 parent 899d294 commit 585db27
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/scripts/controller/PageController.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ export default class PageController {
constructor() {
this.loader = document.querySelector('.js-global-loader');
this.mainContainer = document.querySelector('.js-global-main');

this.DEFAULT_TITLE = 'App Shell';
}

onUpdate() {
Expand Down Expand Up @@ -33,13 +35,11 @@ export default class PageController {
throw new Error('Unexpected response from Server.');
}

/**
* NOTE: We could move the script tags in the partial to the
* bottom of the body, but I don't think it'll change browser
* behaviour so it should be fine to inline the script tag in
* the main element.
**/
document.title = responseObject.title;
if (responseObject.title) {
document.title = responseObject.title;
} else {
document.title = this.DEFAULT_TITLE;
}

// Add style element to the document head
var styleElement = document.createElement('style');
Expand Down

0 comments on commit 585db27

Please sign in to comment.