Fixes citation dialog locator string not working. Closes #1771
Regression in 5a1e329
This commit is contained in:
parent
3d2afa9c7f
commit
51792ba242
1 changed files with 4 additions and 4 deletions
|
@ -237,8 +237,8 @@ var Zotero_QuickFormat = new function () {
|
|||
// add to previous cite
|
||||
var node = _getCurrentEditorTextNode();
|
||||
var prevNode = node.previousSibling;
|
||||
let citationItem = JSON.parse(prevNode && prevNode.dataset.citationItem || "{}");
|
||||
if (citationItem.locator) {
|
||||
let citationItem = JSON.parse(prevNode && prevNode.dataset.citationItem || "null");
|
||||
if (citationItem && citationItem.locator) {
|
||||
citationItem.locator += str;
|
||||
prevNode.dataset.citationItem = JSON.stringify(citationItem);
|
||||
prevNode.textContent = _buildBubbleString(citationItem);
|
||||
|
@ -256,8 +256,8 @@ var Zotero_QuickFormat = new function () {
|
|||
// add to previous cite
|
||||
var node = _getCurrentEditorTextNode();
|
||||
var prevNode = node.previousSibling;
|
||||
let citationItem = JSON.parse(prevNode && prevNode.dataset.citationItem || "{}");
|
||||
if(prevNode && prevNode.citationItem) {
|
||||
let citationItem = JSON.parse(prevNode && prevNode.dataset.citationItem || "null");
|
||||
if (citationItem) {
|
||||
citationItem.locator = m[2];
|
||||
prevNode.dataset.citationItem = JSON.stringify(citationItem);
|
||||
prevNode.textContent = _buildBubbleString(citationItem);
|
||||
|
|
Loading…
Add table
Reference in a new issue