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