Conversation
…unknown marker symbols Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com> Agent-Logs-Url: https://github.com/gatopeich/plotly.js/sessions/faf05e5d-fbbf-4670-97b3-f5ee6a9ec6a0
Copilot
AI
changed the title
[WIP] Remove coerce.js fix and review code related to markers
Remove coerce.js function pass-through hack; fatal errors on unknown marker symbols
Mar 22, 2026
Owner
|
@copilot OO encapsulation: The Error should be thrown from inside lookupSymbol |
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com> Agent-Logs-Url: https://github.com/gatopeich/plotly.js/sessions/702780b7-60c8-481e-9550-f292fc6482c8
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The codebase had a special-case in
coerce.jsallowing raw JS functions to bypass enumerated value validation (added for custom marker symbols), and all symbol lookup failures silently fell back to symbol 0 (circle) with no indication of the bad input.Changes
src/lib/coerce.js: Remove thetypeof v === 'function'bypass inenumeratedcoercion. Functions are now treated as invalid and fall back to the attribute default like any other unrecognized value.src/components/drawing/index.js:symbolNumber(v): throwsError('Unknown marker symbol: ...')instead of returning0singlePointStyle(...): throws on nulllookupSymbolresult instead of silently falling back tolookupSymbol(0)applyBackoff(...): throws on unrecognized end-marker symbol; preservesb = 0whenendMarkeris legitimately absentsrc/traces/scattergl/convert.js—getSymbolSdf(...): throws on nulllookupSymbolresult instead of crashing later with a crypticCannot read property 'path' of nullBefore / after behavior:
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.