diff --git a/chrome/content/zotero/xpcom/style.js b/chrome/content/zotero/xpcom/style.js index e769e21521..690b46af81 100644 --- a/chrome/content/zotero/xpcom/style.js +++ b/chrome/content/zotero/xpcom/style.js @@ -302,7 +302,7 @@ Zotero.Styles = new function() { } catch (error) { // Unless user cancelled, show an alert with the error - if(typeof error === "object" && error instanceof Zotero.Exception.UserCancelled) return; + if(typeof error === "object" && error instanceof Zotero.Exception.UserCancelled) return {}; if(typeof error === "object" && error instanceof Zotero.Exception.Alert) { Zotero.logError(error); if (silent) { diff --git a/test/tests/integrationTest.js b/test/tests/integrationTest.js index d0353087b0..1599c81b90 100644 --- a/test/tests/integrationTest.js +++ b/test/tests/integrationTest.js @@ -365,7 +365,10 @@ describe("Zotero.Integration", function () { describe('when the style is not from a trusted source', function() { it('should download the style and if user clicks YES', function* () { - var styleInstallStub = sinon.stub(Zotero.Styles, "install").resolves(); + var styleInstallStub = sinon.stub(Zotero.Styles, "install").resolves({ + styleTitle: 'Waterbirds', + styleID: 'waterbirds' + }); var style = Zotero.Styles.get(styleID); var styleGetCalledOnce = false; var styleGetStub = sinon.stub(Zotero.Styles, 'get').callsFake(function() {