bug when expr contains Array
@BQXBQX is already working on this.
Since Sep 24, 2025.
Assessment
This issue has not been assessed yet.
Description
const expr = compile("{a.type === 'dash' ? [2, 2] : [0, 0]}");
expect(expr({ type: 'line' })).toEqual([0, 0]);
expect(expr({ type: 'dash' })).toEqual([0, 0]);
Throw error:
FAIL tests/case.test.ts > Some Integration Tests > should return valid value in lineDash
ExpressionError: Unexpected character: {
❯ tokenize src/tokenizer.ts:408:11
406|
407| // If we get here, we have an unexpected character
408| throw new ExpressionError(
| ^
409| `Unexpected character: ${input[pos]}`,
410| pos,
❯ compile src/compile.ts:19:18
❯ tests/case.test.ts:6:18
❯ node_modules/_@vitest_runner@3.2.4@@vitest/runner/dist/chunk-hooks.js:155:11
- Dominant language
- TypeScript
- Stars
- 26
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from antvis/expr
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelcontextprotocol/inspector#2458 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
carbon-design-system/ibm-products#9907 ·