don't leave {Citation}s hanging if somehow they end up the document

This commit is contained in:
Simon Kornblith 2011-03-29 04:38:20 +00:00
parent c63b244d56
commit 06d93e4d61

View File

@ -916,7 +916,7 @@ Zotero.Integration.Document.prototype._updateSession = function(newField, editFi
bibliographyData = fieldCode.substr(BIBLIOGRAPHY_CODE.length+1); bibliographyData = fieldCode.substr(BIBLIOGRAPHY_CODE.length+1);
} }
} else if(fieldCode == "TEMP") { } else if(fieldCode == "TEMP") {
if(newField) { if(newField && newField.equals(field)) {
editFieldIndex = i; editFieldIndex = i;
editField = field; editField = field;
} else { } else {
@ -1082,7 +1082,7 @@ Zotero.Integration.Document.prototype.addCitation = function() {
if(!field) return; if(!field) return;
field.setCode("TEMP"); field.setCode("TEMP");
this._updateSession(true); this._updateSession(field);
this._updateDocument(); this._updateDocument();
} }