-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
matchAll Polyfill #132
Comments
For a workaround, you could consider using the npm package string.prototype.matchall to polyfill. It provides a shim, so at the start of your app, I think you could call Which browser are you using? |
Right -- I've impl'd that polyfill and it seems to work for us. But it took us an hour to realize this was the issue. Figured I'd post here to save others some time. I'm able to reproduce this on Chrome 70.x on Mac. It's difficult to run multiple Chrome versions on the same machine, but you can download an old build of Chromium and easily run that side-by-side. Here's the version I'm using: version: 70.0.3538.124 Here's a sample stacktrace, although, the issue is rather straight forward: |
Just checked on caniuse and @schonfeld out of curiosity, what browsers do you need to support? Do you have a defined policy for that? |
I don't really a policy, per se. We typically try to not be bothered by older/out-dated browsers, but this issue seemed to affect a non-negligible portion of our daily users, somewhere in the 200 uniques per day... It seems to affect mostly mobile browsers. I suspect because those are usually tied to OS updates, and some folks are unable to upgrade on older devices... |
Okay, that makes sense. Thanks for the info! |
@schonfeld you can now |
This was addressed in release v1.6.0. |
Confirmed working on latest v1.6.0. Thanks so much, @dcastil ! |
We've been seeing some client side error logs re
.matchAll()
calls evaluating toundefined
. After a bit of digging, we realized that all of those exceptions originate on older-ish browsers. Nonetheless, this is an issue for us (and I suspect others, too). Specifically, the issue stems from this line:tailwind-merge/src/lib/merge-classlist.ts
Line 83 in a703309
I'm curious if you've given thought to adding a matchAll polyfill, or using a different approach to matching?
The text was updated successfully, but these errors were encountered: