Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[withStyles] Use WeakMap instead of Map to prevent high memory usage #230
ljharb left a comment
WeakMap can’t be polyfilled, so this change will break in airbnb-supported browsers. (unless those have changed drastically in 2 months)
An alternative is to use typeof to detect it, and fall back to a Map when it’s missing.
@ljharb Oh! This support table shows that we should be ok though
And no, I don't think the browser support policy changed in the last few months.
But anyway, this is still a good improvement. I'll make the change.