Fix title display when installing style via connector (broken in 0f1687f1c7)

This commit is contained in:
Dan Stillman 2018-08-13 18:16:43 -04:00
parent 51996b537d
commit 11f8bd20d6
2 changed files with 10 additions and 6 deletions

View file

@ -674,10 +674,14 @@ describe("Connector Server", function () {
.createInstance(Components.interfaces.nsIDOMParser),
doc = parser.parseFromString(style, "application/xml");
return Zotero.Promise.resolve(
Zotero.Utilities.xpathText(doc, '/csl:style/csl:info[1]/csl:title[1]',
Zotero.Styles.ns)
);
return Zotero.Promise.resolve({
styleTitle: Zotero.Utilities.xpathText(
doc, '/csl:style/csl:info[1]/csl:title[1]', Zotero.Styles.ns
),
styleID: Zotero.Utilities.xpathText(
doc, '/csl:style/csl:info[1]/csl:id[1]', Zotero.Styles.ns
)
});
});
var style = `<?xml version="1.0" encoding="utf-8"?>