ant-design / cssinjs

https://ant-design.github.io/cssinjs
MIT License
235 stars 57 forks source link

Uncaught RangeError: Invalid string length #156

Open wang-yikai opened 8 months ago

wang-yikai commented 8 months ago

The following line causes the string to become very large if there are a lot of tokens: https://github.com/ant-design/cssinjs/blob/92dce00796e2644dad391b49ec1def849329234a/src/util.ts#L47

Screenshot 2023-11-01 at 4 21 56 PM

If the string becomes too long, it would exceed the capacity of the runtime system and raise an Uncaught RangeError: Invalid string length error.