www

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

commit 0298d4abc7b6776a35430802214f12f4d676ceb0
parent 3dcd3c8ca72246a675809635da82d6873cb374e2
Author: Avram Lyon <ajlyon@gmail.com>
Date:   Sun, 30 Jan 2011 20:57:08 +0000

Trans: RDF fix from Frank, fixes ticket #1772


Diffstat:
Mtranslators/RDF.js | 16+++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/translators/RDF.js b/translators/RDF.js @@ -68,10 +68,17 @@ function handleCreators(newItem, creators, creatorType) { return; } - if(typeof(creators[0]) != "string") { // see if creators are in a container + if(typeof(creators[0]) != "string") { + // see if creators are in a container, but if they don't seem to be, + // then we don't attempt to extract them. try { - var creators = Zotero.RDF.getContainerElements(creators[0]); - } catch(e) {} + var newCreators = Zotero.RDF.getContainerElements(creators[0]); + } catch (e) { + Zotero.debug("Exception caught in Zotero.RDF.getContainerElements"); + } + if (creators.length === newCreators.length) { + creators = newCreators; + } } if(typeof(creators[0]) == "string") { // support creators encoded as strings @@ -629,4 +636,4 @@ function doImport() { newCollection.complete(); } } -} -\ No newline at end of file +}