不要怂,就是干,撸起袖子干!

Commit 202c33fb by Daniel Durante

Forgot to move the tick variable to the top of the file in custom event emitters.

1 parent bbd36fe2
Showing with 1 additions and 2 deletions
...@@ -2,7 +2,7 @@ var util = require("util") ...@@ -2,7 +2,7 @@ var util = require("util")
, EventEmitter = require("events").EventEmitter , EventEmitter = require("events").EventEmitter
, Promise = require("promise") , Promise = require("promise")
, proxyEventKeys = ['success', 'error', 'sql'] , proxyEventKeys = ['success', 'error', 'sql']
, tick = (typeof setImmediate !== "undefined" ? setImmediate : process.nextTick)
var bindToProcess = function(fct) { var bindToProcess = function(fct) {
if (fct) { if (fct) {
...@@ -21,7 +21,6 @@ module.exports = (function() { ...@@ -21,7 +21,6 @@ module.exports = (function() {
util.inherits(CustomEventEmitter, EventEmitter) util.inherits(CustomEventEmitter, EventEmitter)
CustomEventEmitter.prototype.run = function() { CustomEventEmitter.prototype.run = function() {
var tick = (typeof setImmediate !== "undefined" ? setImmediate : process.nextTick)
tick(function() { tick(function() {
if (this.fct) { if (this.fct) {
this.fct.call(this, this) this.fct.call(this, this)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!