lukeed/clsxPublic

A tiny (239B) utility for constructing `className` strings conditionally.

Is There A Bug in Microsoft Edge that Impacts clsx?

VI

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](https://github.com/lukeed/clsx/assets/18017954/4dfa9397-eec3-489c-b9fe-cdebaea8bd99)

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.

  1. LU

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

  2. VI
    Author

    Interesting!

  3. LU

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

  4. lukeedclosed3 years ago on GitHub

  5. VI
    Author

    Thanks for your great advice on this Luke! I've [posted to StackOverflow](https://stackoverflow.com/questions/76893451/attention-microsoft-there-is-a-bug-in-microsoft-edge-sourcemap-handling) so that MS can find out about it.