Skip to content

Commit

Permalink
Avoid crash under some obscure disambig conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Jun 17, 2019
1 parent 7a2bbba commit 12125e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/disambig_cites.js
Expand Up @@ -597,6 +597,9 @@ CSL.Disambiguation.prototype.captureStepToBase = function() {
if (this.state.citation.opt["givenname-disambiguation-rule"] === "by-cite"
&& this.base.givens && this.base.givens.length) {
if ("undefined" !== typeof this.base.givens[this.gnameset][this.gname]) {
if (this.betterbase.givens.length < this.base.givens.length) {
this.betterbase.givens = JSON.parse(JSON.stringify(this.base.givens));
}
this.betterbase.givens[this.gnameset][this.gname] = this.base.givens[this.gnameset][this.gname];
}
}
Expand Down

0 comments on commit 12125e3

Please sign in to comment.