extraToCSL(): Fix "zoteroField[1] is undefined" on single-character field
E.g., "a:" on a line https://forums.zotero.org/discussion/82286/new-line-in-extra-field-induces-error-during-bibliography-generation
This commit is contained in:
parent
9919090901
commit
91ca6d2ba6
2 changed files with 6 additions and 1 deletions
|
@ -41,5 +41,10 @@ describe("Zotero.Cite", function () {
|
|||
var str2 = 'DOI: 10.0/abc';
|
||||
assert.equal(Zotero.Cite.extraToCSL(str1), str2);
|
||||
});
|
||||
|
||||
it("should handle a single-character field name", function () {
|
||||
var str = 'a: ';
|
||||
assert.equal(Zotero.Cite.extraToCSL(str), str);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue