Avoid the release of Zalgo (#1295)
This commit is contained in:
committed by
delvedor
parent
f02567491f
commit
584a8799d8
@ -664,7 +664,10 @@ function ESAPI (opts) {
|
||||
return apis
|
||||
|
||||
function handleError (err, callback) {
|
||||
if (callback) return callback(err, result)
|
||||
if (callback) {
|
||||
process.nextTick(callback, err, result)
|
||||
return { then: noop, catch: noop, abort: noop }
|
||||
}
|
||||
return Promise.reject(err)
|
||||
}
|
||||
|
||||
@ -699,4 +702,6 @@ function lazyLoad (file, opts) {
|
||||
}
|
||||
}
|
||||
|
||||
function noop () {}
|
||||
|
||||
module.exports = ESAPI
|
||||
|
||||
Reference in New Issue
Block a user