Optional Chaining - Function.prototype.apply was called on undefined, which is an undefined and not a function Optional Chaining - Function.prototype.apply was called on undefined, which is an undefined and not a function google-chrome google-chrome

Optional Chaining - Function.prototype.apply was called on undefined, which is an undefined and not a function


It turns out to be a V8 bug, I've submitted it there, hopefully, it'll be fixed soon.

Update: it has been fixed.


There are a couple rules to follow with ...rest arguments.

One of those rules is that the ...rest argument can only be the last argument.

foo(...one, ...wrong, ...wrong)foo(...wrong, bad, bad)foo(ok, ok, ...correct)

See:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters