lukeed / clsx

A tiny (239B) utility for constructing `className` strings conditionally.
MIT License
8.08k stars 141 forks source link

Is There A Bug in Microsoft Edge that Impacts clsx? #78

Closed VikR1000 closed 1 year ago

VikR1000 commented 1 year ago

MS Edge seems like it may have a bug in it that impacts clsx.

Edge displays a 100% repeatable bug on my web app. This bug doesn’t show up in Chrome, Firefox, or Safari. The stack trace doesn’t touch anyplace in my own Javascript code. The trace claims the bug in is in clsx, on a call to a function that clsx doesn't call. The bug halts execution of my code.

Here's the stack trace:

Screenshot 2023-08-10 at 10 27 26 AM

The stack trace claims the bug is on a call to the ApolloGraphQL function storeWriter.writeToStore located in clsx at line 1, position 374. But of course clsx doesn't interact with ApolloGraphQL at all.

The bug happens when my app runs an ApolloGraphQL function, but the stack trace (and it goes on about 5 times as long as the part of it shown in the screen shot) never points to a line in my own code.

So it seems like this may be a bug in MS Edge.

I'm just posting this here in case anyone has any thoughts or suggestions. I posted about this on the ApolloGraphQL community board too.

I'm trying to avoid taking hours to see if I can make a tiny project that demos the glitch, but that may be the only next move.

lukeed commented 1 year ago

There’s no Array.forEach in clsx either. I suggest you try to troubleshoot without Minified code. This feels like a source map issue

VikR1000 commented 1 year ago

Interesting!

lukeed commented 1 year ago

Closing as not actionable. Definitely a sourcemap issue, as shown by the green arrow in your screenshot

VikR1000 commented 1 year ago

Thanks for your great advice on this Luke! I've posted to StackOverflow so that MS can find out about it.