dougwilson / nodejs-depd

Deprecate all the things
MIT License
327 stars 87 forks source link

Turkish Language Problem #34

Closed yankikucuk closed 5 years ago

yankikucuk commented 5 years ago

If OS default language is Turkish, some errors occur. More info and solution here.

dougwilson commented 5 years ago

That is not a solution, only a work around. Just completely disabling functionality doesn't make sense. If you can provide complete steps to reproduce the issue here, I can reproduce, debug, and determine a solution to work on the given platform.

dougwilson commented 5 years ago

Reading though that issue and looking at the change, I think this is opened in the wrong place.

The solution you linked to which is to add the line if (fn == undefined) return; changes the behavior of wrapfunction in the following way: when called without a function to wrap, it will return nothing instead of throwing an error.

The purpose of the error is to detect when wrapfunction is being called incorrectly. Essentially, the only reason you are getting that error is due to an error with whatever is calling this module. That posted solution "works" in the sense that the error is just now ignored, but whatever the actual issue is still exists, it just doesn't complain any longer.

I would suggest determining the root of the issue and filing an issue with whatever the cause is.