浏览代码

EAGLESIX-3881: use process.nextTick instead of setImmediate (DNE in all browsers and process.nextTick is preferred if available)

Kyle P Davis 11 年之前
父节点
当前提交
8a971ae197
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/pipeline/documentSources/CursorDocumentSource.js

+ 1 - 1
lib/pipeline/documentSources/CursorDocumentSource.js

@@ -167,7 +167,7 @@ proto.getCurrent = function getCurrent() {
  **/
  **/
 proto.setSource = function setSource(theSource, callback) {
 proto.setSource = function setSource(theSource, callback) {
 	if (theSource) throw new Error("CursorDocumentSource doesn't take a source"); //TODO: This needs to put back without the if once async is fully and properly supported
 	if (theSource) throw new Error("CursorDocumentSource doesn't take a source"); //TODO: This needs to put back without the if once async is fully and properly supported
-	if (callback) return setImmediate(callback);
+	if (callback) return process.nextTick(callback);
 };
 };
 
 
 /**
 /**