Merge branch '3.0'
This commit is contained in:
commit
bd688f333c
3 changed files with 9 additions and 8 deletions
|
@ -671,7 +671,7 @@ var Zotero_File_Interface = new function() {
|
|||
.redraw();
|
||||
|
||||
// Process redraw event
|
||||
Zotero.mainThread.processNextEvent(false);
|
||||
Zotero.wait(0);
|
||||
} finally {
|
||||
// Close nested event queue
|
||||
if(eventQueuePushed) Zotero.mainThread.popEventQueue();
|
||||
|
|
|
@ -167,12 +167,13 @@ Zotero.Translate.Sandbox = {
|
|||
*/
|
||||
"loadTranslator":function(translate, type) {
|
||||
const setDefaultHandlers = function(translate, translation) {
|
||||
if(Zotero.Utilities.isEmpty(translation._handlers)) {
|
||||
if(type !== "export") {
|
||||
translation.setHandler("itemDone", function(obj, item) {
|
||||
translate.Sandbox._itemDone(translate, item);
|
||||
});
|
||||
}
|
||||
if(type !== "export"
|
||||
&& (!translation._handlers['itemDone'] || !translation._handlers['itemDone'].length)) {
|
||||
translation.setHandler("itemDone", function(obj, item) {
|
||||
translate.Sandbox._itemDone(translate, item);
|
||||
});
|
||||
}
|
||||
if(!translation._handlers['selectItems'] || !translation._handlers['selectItems'].length) {
|
||||
translation.setHandler("selectItems", translate._handlers["selectItems"]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1441,7 +1441,7 @@ Components.utils.import("resource://gre/modules/Services.jsm");
|
|||
* @param {Integer} [timeout=50] Maximum number of milliseconds to wait
|
||||
*/
|
||||
this.wait = function (timeout) {
|
||||
if (!timeout) {
|
||||
if (timeout === undefined) {
|
||||
timeout = 50;
|
||||
}
|
||||
var mainThread = Zotero.mainThread;
|
||||
|
|
Loading…
Reference in a new issue