discordjs / Commando

Official command framework for discord.js
Apache License 2.0
497 stars 243 forks source link

Fix #386 #388

Closed Technical-13 closed 3 years ago

Technical-13 commented 3 years ago

Replace the usage of instanceof Array and instanceof Set with Array.isArray() and .toString() == "[object Set]" respectively in the whole codebase.

perzeuss commented 3 years ago

I can find 11 usages of instanceof Array in src/extensions/message.js. Only 3 are fixed. Did you left the other usages untouched for a reason?

Technical-13 commented 3 years ago

I searched for instanceof Array in the search bar and did all the ones that I saw come up. I'd be happy to do the rest, just didn't find them in the search.

dragonfire535 commented 3 years ago

There is absolutely no reason to do this in node. The situations that cause instanceof to be an issue are not applicable to node.