Replace direct nsITimer call with setTimeout()
This commit is contained in:
parent
eeedc49274
commit
b916935256
|
@ -328,11 +328,9 @@ Zotero.Attachments = new function(){
|
||||||
// if it fails
|
// if it fails
|
||||||
//
|
//
|
||||||
// TODO: index later
|
// TODO: index later
|
||||||
var timer = Components.classes["@mozilla.org/timer;1"].
|
setTimeout(function() {
|
||||||
createInstance(Components.interfaces.nsITimer);
|
|
||||||
timer.initWithCallback({notify: function() {
|
|
||||||
Zotero.Fulltext.indexItems([itemID]);
|
Zotero.Fulltext.indexItems([itemID]);
|
||||||
}}, 1000, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
|
}, 1000);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
// Clean up
|
// Clean up
|
||||||
|
|
Loading…
Reference in New Issue
Block a user