Skip to content

Commit

Permalink
Only create example biblio when an id is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
bterlson committed Aug 20, 2015
1 parent 6e12c14 commit 874e55d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lib/Example.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ module.exports = class Example extends Builder {
}

build(number) {
// biblio is added during the build step as we don't know
// the number at build time. Could probably be fixed.
this.spec.biblio.examples[this.id] = {
location: '',
id: this.id,
number: number || 1,
clauseId: this.clause.id
};
if (this.id) {
// biblio is added during the build step as we don't know
// the number at build time. Could probably be fixed.
this.spec.biblio.examples[this.id] = {
location: '',
id: this.id,
number: number || 1,
clauseId: this.clause.id
};
}

this.node.innerHTML = '<figure>' + this.node.innerHTML + '</figure>';

Expand Down

0 comments on commit 874e55d

Please sign in to comment.