From 884d03b12a0e9605fa88f574962d4d79bf1111a5 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 28 Jul 2017 18:45:37 -0400 Subject: [PATCH] Remove prompt when adding style manually (And prompt was showing "(null)") --- chrome/content/zotero/preferences/preferences_cite.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/preferences/preferences_cite.js b/chrome/content/zotero/preferences/preferences_cite.js index ddb0ee574..5e8bd44e9 100644 --- a/chrome/content/zotero/preferences/preferences_cite.js +++ b/chrome/content/zotero/preferences/preferences_cite.js @@ -117,7 +117,11 @@ Zotero_Preferences.Cite = { var rv = fp.show(); if (rv == nsIFilePicker.returnOK || rv == nsIFilePicker.returnReplace) { - Zotero.Styles.install(fp.file); + Zotero.Styles.install({ file: fp.file }, fp.file.path, true) + .catch(function (e) { + (new Zotero.Exception.Alert("styles.install.unexpectedError", + fp.file.path, "styles.install.title", e)).present() + }); } },