Skip to content

Commit

Permalink
Added checks to titles key in themes to ensure backward compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanHavoc committed Sep 3, 2016
1 parent 03c047d commit fd9aa9c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion manager/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,24 @@ module.exports = {
fs.copy(_this.pathify(_this.module_path + '/_template/app'), _this.$config.path + '/app');
fs.copy(_this.pathify(_this.module_path + '/_template/index.html'), _this.$config.path + '/index.html');
fs.copy(_this.pathify(_this.module_path + '/_template/LICENSE.txt'), _this.$config.path + '/LICENSE.txt');

_this.updateVersion(pjson.version);

/**
* Version 1.7.0 introduced customisable titles.
* If updating from pre-1.7.0 we need to add in the
* default titles.
*/
if(!_this.$data.theme.hasOwnProperty("titles")) {
_this.$data.theme.titles = {
"library_title": "Pattern Library",
"pages_title": "Overview",
"components_title": "Components"
}

_this.saveData(function() {});
}

return callback();
},

Expand Down

0 comments on commit fd9aa9c

Please sign in to comment.