Update citeproc instances in Integration on Styles.reinit
Closes zotero/zotero-word-for-windows-integration#34
This commit is contained in:
parent
37fa0c203f
commit
8f19d1f826
|
@ -187,6 +187,13 @@ Zotero.Integration = new function() {
|
|||
}
|
||||
}
|
||||
|
||||
this.resetSessionStyles = Zotero.Promise.coroutine(function* (){
|
||||
for (let sessionID in Zotero.Integration.sessions) {
|
||||
let session = Zotero.Integration.sessions[sessionID];
|
||||
yield session.setData(session.data, true);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Checks to see that plugin versions are up to date.
|
||||
* @return {Promise} Promise that is resolved with true if versions are up to date
|
||||
|
|
|
@ -130,6 +130,10 @@ Zotero.Styles = new function() {
|
|||
|
||||
_initializationDeferred.resolve();
|
||||
_initialized = true;
|
||||
|
||||
// Styles are fully loaded, but we still need to trigger citeproc reloads in Integration
|
||||
// so that style updates are reflected in open documents
|
||||
Zotero.Integration.resetSessionStyles();
|
||||
});
|
||||
|
||||
this.reinit = function (options = {}) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user