mirror of https://github.com/lukechilds/node.git
Browse Source
`x instanceof f` where f is an arrow function throws a (spec-conforming) "Function has non-object prototype 'undefined' in instanceof check" exception. Add a workaround so that it's possible to pass arrow functions as the second argument to assert.throws(). The try/catch block is a little jarring but swapping around the clauses in the if statements changes the semantics too much. Fixes: https://github.com/nodejs/node/issues/3275 PR-URL: https://github.com/nodejs/node/pull/3276 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>v4.x
committed by
James M Snell
2 changed files with 13 additions and 5 deletions
Loading…
Reference in new issue