ant-design / ant-design/cssinjs

Uncaught RangeError: Invalid string length

Open
#156 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
287
Forks
80
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading src/util.ts at line 47 and reproduce the failure with a large number of tokens. The issue does not name a test or specify the intended behavior; done should mean the large-token case no longer raises the reported uncaught RangeError, with coverage for that case if the existing test structure supports it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.