aloktomarr opened a new pull request, #21696:
URL: https://github.com/apache/echarts/pull/21696
## Brief Information
This pull request is in the type of:
- [x] bug fixing
- [ ] new feature
- [ ] others
### What does this PR do?
Prevents a single empty/invalid `markLine.data` entry (e.g. `{}`) from
throwing and wiping out all markLines in the series.
### Fixed issues
- close #21683
## Details
### Before: What was the problem?
An empty object `{}` in `markLine.data` is normalized to `[undefined,
undefined, {...}]`. `markLineFilter` then read `item[0].coord`/`item[1].coord`
on the `undefined` endpoints, throwing `TypeError: Cannot read properties of
undefined (reading 'coord')`. This aborted rendering of every markLine in the
series, so no markLine was drawn at all.
### After: How does it behave after the fixing?
`markLineFilter` now treats an item with a missing endpoint as invalid and
filters it out. The empty entry is skipped and the remaining valid markLines
render normally. A regression unit test was added
(`test/ut/spec/component/marker/MarkLine.test.ts`) that asserts `setOption`
does not throw and the valid markLines are still rendered.
## Document Info
- [x] This PR doesn't relate to document changes
## Misc
### Security Checking
- [ ] This PR uses security-sensitive Web APIs.
### ZRender Changes
- [ ] This PR depends on ZRender changes.
### Merging options
- [x] Please squash the commits into a single one when merging.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]