Skip to content

Commit

Permalink
Fix code issues for meta-information creation
Browse files Browse the repository at this point in the history
  • Loading branch information
tormozz48 committed Feb 22, 2015
1 parent eda9336 commit c86ecce
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/model/nodes/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ BaseNode.prototype = {
createMeta: function () {
var _this = this;
this.meta = { breadcrumbs: utility.getLanguages().reduce(function (prevL, lang) {
_this.breadcrumbs = _this.breadcrumbs || [];
prevL[lang] = _this.breadcrumbs.reduce(function (prevB, breadcrumb) {
prevB.push({ title: breadcrumb.title[lang], url: breadcrumb.url });
return prevB;
Expand Down
4 changes: 2 additions & 2 deletions src/model/nodes/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ var util = require('util'),
}
})
.init(parent)
.createBreadcrumbs()
.createMeta();
.createBreadcrumbs();
this.createMeta();
};

BlockNode.prototype = Object.create(nodes.dynamic.DynamicNode.prototype);
Expand Down
4 changes: 2 additions & 2 deletions src/model/nodes/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ var util = require('util'),
}
})
.init(parent)
.createMeta(id)
.createBreadcrumbs();
this.createMeta(id);
};

PostNode.prototype = Object.create(nodes.dynamic.DynamicNode.prototype);
Expand Down Expand Up @@ -81,7 +81,7 @@ PostNode.prototype.createMeta = function (docType) {
conditions.version,
docType
],
block: {
library: {
name: conditions.lib,
version: conditions.version,
status: 'current',
Expand Down
4 changes: 2 additions & 2 deletions src/model/nodes/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ var util = require('util'),
})
.init(parent)
.addItems(version)
.createMeta()
.createBreadcrumbs();

this.createMeta();
this.cacheVersion = cacheVersion;
};

Expand Down Expand Up @@ -100,7 +100,7 @@ VersionNode.prototype.createMeta = function () {
conditions.version,
'description'
],
block: {
library: {
name: conditions.lib,
version: conditions.version,
status: 'current',
Expand Down

0 comments on commit c86ecce

Please sign in to comment.