Don't update item type menus within transaction when updating schema
This caused an error reported here, though I can't reproduce it: https://forums.zotero.org/discussion/80287/zotero-database-upgrade-error
This commit is contained in:
parent
858de5e6f2
commit
222870d3c7
1 changed files with 9 additions and 8 deletions
|
@ -775,14 +775,15 @@ Zotero.Schema = new function(){
|
||||||
yield Zotero.SearchConditions.init();
|
yield Zotero.SearchConditions.init();
|
||||||
|
|
||||||
// Update item type menus in every open window
|
// Update item type menus in every open window
|
||||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
Zotero.Schema.schemaUpdatePromise.then(function () {
|
||||||
.getService(Components.interfaces.nsIWindowMediator);
|
var wm = Services.wm;
|
||||||
var enumerator = wm.getEnumerator("navigator:browser");
|
var enumerator = wm.getEnumerator("navigator:browser");
|
||||||
while (enumerator.hasMoreElements()) {
|
while (enumerator.hasMoreElements()) {
|
||||||
var win = enumerator.getNext();
|
let win = enumerator.getNext();
|
||||||
win.ZoteroPane.buildItemTypeSubMenu();
|
win.ZoteroPane.buildItemTypeSubMenu();
|
||||||
win.document.getElementById('zotero-editpane-item-box').buildItemTypeMenu();
|
win.document.getElementById('zotero-editpane-item-box').buildItemTypeMenu();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue