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

Commit 06fd640e by sdepold

removed obsolete null emitter

1 parent 4be6547c
...@@ -103,8 +103,9 @@ module.exports = (function() { ...@@ -103,8 +103,9 @@ module.exports = (function() {
DAOFactory.prototype.find = function(options) { DAOFactory.prototype.find = function(options) {
if([null, undefined].indexOf(options) > -1) { if([null, undefined].indexOf(options) > -1) {
var NullEmitter = require("./emitters/null-emitter") return new Utils.CustomEventEmitter(function(emitter) {
return new NullEmitter() setTimeout(function() { emitter.emit('success', null) }, 10)
}).run()
} }
// options is not a hash but an id // options is not a hash but an id
......
var Utils = require("../utils")
module.exports = (function(){
var NullEmitter = function(delay) {
var self = this
delay = delay || 10
setTimeout(function() { self.emitNull() }, delay)
}
Utils.addEventEmitter(NullEmitter)
NullEmitter.prototype.emitNull = function() {
this.emit('success', null)
this.emit('error', null)
}
return NullEmitter
})()
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!