www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 9c28c6bb9c67cb2c3ed9f4e00daed3dd001722ab
parent 5d2f9e329316d6f2249332eb917937e2d6d693f6
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu,  4 Jun 2009 08:32:26 +0000

Fixes "this._IDMap is undefined" error from Embedded RDF translator


Diffstat:
Mchrome/content/zotero/xpcom/translate.js | 16++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translate.js b/chrome/content/zotero/xpcom/translate.js @@ -635,7 +635,15 @@ Zotero.Translate.prototype.translate = function(libraryID, saveAttachments) { throw("cannot translate: no location specified"); } - this.libraryID = (libraryID === true || libraryID == undefined) ? null : libraryID; + if(libraryID === false) { + this.libraryID = false; + } + else if(libraryID === true || libraryID == undefined) { + this.libraryID = null; + } + else { + this.libraryID = libraryID; + } this.saveAttachments = !(saveAttachments === false); this.saveFiles = this.saveAttachments; @@ -804,7 +812,6 @@ Zotero.Translate.prototype._generateSandbox = function() { translation.setHandler("selectItems", me._handlers["selectItems"]); } } - return translation.translate(false); }; safeTranslator.getTranslatorObject = function() { @@ -1158,8 +1165,9 @@ Zotero.Translate.prototype._itemDone = function(item, attachedTo) { this._itemsDone = true; - if(this.libraryID === false) { // if we're not supposed to save the item, just - // return the item array + // if we're not supposed to save the item or we're in a child translator, + // just return the item array + if(this.libraryID === false || this._parentTranslator) { // if a parent sandbox exists, use complete() function from that sandbox if(this._parentTranslator) {