Open shimizu-izumi opened 3 months ago
Why don't you try breaking down the statement into multiple statements to avoid confusion? I will see if there's an issue when I'm free.
I've tried to reproduce the issue and can confirm this happens. Seems like an issue with the tsup transpiler. In the mean time I recommend breaking down your conditions into their own variables. Thanks for bringing this issue up!
@notunderctrl did you test this with latest version of tsup? The real compiler here is esbuild, gotta check if latest esbuild does this.
I have this if statement in a critical event in my bot which is used to lockdown posting tweets to a specific channel and tagging the bot in a message.
However, one of the server members pinged my bot and it posted his message on our twitter which is a huge problem for a 4.6K followers account which is used to publish information about a game. After looking at my and the compiled code I noticed that the compiler is the problem because the if in the resulting .mjs file is this