Closed Nokel81 closed 2 years ago
Right, both callback and options are optional; you're passing undefined
, which it doesn't know how to deal with. If you don't want to specify options or a callback, omit the argument altogether.
Yes but in JS passing undefined as a parameter should mean the same as not passing it. And if I am making a wrapper around your method then I shouldn't have to check if the optional field is not passed in.
For instance with default params, passing undefined means "use default".
Ah, true; this does make wrappers inconvenient. PR welcome to fix.
fs-extra
version:10.0.1The follow code:
produces the following type error:
TypeError: Cannot read property 'overwrite' of undefined
The error seems to be from the handling of
optional callback
andoptional options
on line 12-15 oflib/move/move.js