Fix error migrating Extra with empty author in citeproc-js cheater syntax
E.g., `{:author: }` https://forums.zotero.org/discussion/83070/error-report-id-n-a-there-was-an-error-starting-zotero
This commit is contained in:
parent
ee474e33cb
commit
0199428c57
2 changed files with 11 additions and 0 deletions
|
@ -266,6 +266,13 @@ describe("Zotero.Utilities.Internal", function () {
|
|||
assert.strictEqual(extra, '');
|
||||
});
|
||||
|
||||
it("should ignore empty creator in citeproc-js cheater syntax", function () {
|
||||
var str = '{:author: }\n';
|
||||
var { fields, extra } = Zotero.Utilities.Internal.extractExtraFields(str);
|
||||
assert.equal(fields.size, 0);
|
||||
assert.strictEqual(extra, str);
|
||||
});
|
||||
|
||||
it("should ignore both Event Place and Publisher Place (temporary)", function () {
|
||||
var str = "Event Place: Foo\nPublisher Place: Bar";
|
||||
var { fields, extra } = Zotero.Utilities.Internal.extractExtraFields(str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue