Do not load citeproc-rs on Style.init() unless it's enabled

Closes #2363
This commit is contained in:
Adomas Venčkauskas 2022-02-21 13:48:54 +02:00
parent 48a3235a2e
commit 000599bfff
2 changed files with 6 additions and 1 deletions

View file

@ -270,6 +270,9 @@ Zotero.Prefs = new function(){
if (!win.Zotero) continue;
Zotero.updateQuickSearchBox(win.document);
}
}],
[ "cite.useCiteprocRs", function(val) {
val && Zotero.CiteprocRs.init();
}]
];

View file

@ -45,7 +45,9 @@ Zotero.Styles = new function() {
* Initializes styles cache, loading metadata for styles into memory
*/
this.init = Zotero.Promise.coroutine(function* (options = {}) {
yield Zotero.CiteprocRs.init();
if (Zotero.Prefs.get('cite.useCiteprocRs')) {
yield Zotero.CiteprocRs.init();
}
// Wait until bundled files have been updated, except when this is called by the schema update
// code itself