From 2408069055e47e5454a53a90430a9e46d18a836b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 8 Jul 2009 05:50:07 +0000 Subject: [PATCH] Fix "cleanDOI:argument must be a string" error --- chrome/content/zotero/bindings/itembox.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index 104b3901e8..39b629c30c 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -263,7 +263,7 @@ // If that fails, try the DOI field if (!spec) { var doi = this.item.getField('DOI'); - if (doi) { + if (doi && typeof val == 'String') { // Pull out DOI, in case there's a prefix doi = Zotero.Utilities.prototype.cleanDOI(doi);; if (doi) { @@ -452,7 +452,7 @@ label.setAttribute("onclick", "ZoteroPane.loadURI(this.nextSibling.firstChild ? this.nextSibling.firstChild.nodeValue : this.nextSibling.value, event)"); label.setAttribute("tooltiptext", Zotero.getString('pane.item.goToURL.online.tooltip')); } - else if (fieldName == 'DOI' && val) { + else if (fieldName == 'DOI' && val && typeof val == 'String') { // Pull out DOI, in case there's a prefix var doi = Zotero.Utilities.prototype.cleanDOI(val); if (doi) {