Trans: RDF fix from Frank, fixes ticket #1772
This commit is contained in:
parent
3dcd3c8ca7
commit
0298d4abc7
1 changed files with 11 additions and 4 deletions
|
@ -68,10 +68,17 @@ function handleCreators(newItem, creators, creatorType) {
|
||||||
return;
|
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 {
|
try {
|
||||||
var creators = Zotero.RDF.getContainerElements(creators[0]);
|
var newCreators = Zotero.RDF.getContainerElements(creators[0]);
|
||||||
} catch(e) {}
|
} 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
|
if(typeof(creators[0]) == "string") { // support creators encoded as strings
|
||||||
|
@ -629,4 +636,4 @@ function doImport() {
|
||||||
newCollection.complete();
|
newCollection.complete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue