Avoid the release of Zalgo (#1295)
This commit is contained in:
committed by
GitHub
parent
96a54d0539
commit
7f317d3321
@ -717,7 +717,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)
|
||||
}
|
||||
|
||||
@ -752,4 +755,6 @@ function lazyLoad (file, opts) {
|
||||
}
|
||||
}
|
||||
|
||||
function noop () {}
|
||||
|
||||
module.exports = ESAPI
|
||||
|
||||
Reference in New Issue
Block a user