transcontextual safe type checks
This commit is contained in:
parent
e2c0949dd5
commit
78014a2ea3
|
@ -50,7 +50,7 @@ function mergeFunctionArgs (argv, start, end) {
|
||||||
if (Array.isArray(argv[i])) {
|
if (Array.isArray(argv[i])) {
|
||||||
const arr = argv[i]
|
const arr = argv[i]
|
||||||
for (let j = 0; j < arr.length; j++) {
|
for (let j = 0; j < arr.length; j++) {
|
||||||
if ((typeof arr[j] !== 'function')) {
|
if (typeof arr[j] !== 'function') {
|
||||||
throw new TypeError('Invalid argument type: ' + typeof (arr[j]))
|
throw new TypeError('Invalid argument type: ' + typeof (arr[j]))
|
||||||
}
|
}
|
||||||
handlers.push(arr[j])
|
handlers.push(arr[j])
|
||||||
|
|
Loading…
Reference in New Issue