Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add null check for utils.getMorePropsForChart #706

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mm0
Copy link

@mm0 mm0 commented Mar 9, 2024

When using the FibonacciRetracements component, I get an exception:

utils.ts:77 Uncaught TypeError: Cannot read properties of undefined (reading 'find')
    at getMorePropsForChart (utils.ts:77:1)
    at DrawingObjectSelector.tsx:39:1
    at index.ts:150:1
    at Array.forEach (<anonymous>)
    at mapObject (index.ts:148:1)
    at DrawingObjectSelector.getInteraction (DrawingObjectSelector.tsx:32:1)
    at DrawingObjectSelector.handleClick [as onMouseDown] (DrawingObjectSelector.tsx:67:1)
    at GenericComponent.evaluateType (GenericComponent.tsx:160:1)
    at GenericComponent.listener (GenericComponent.tsx:118:1)
    at ChartCanvas.tsx:911:1

In other places in the source code, I see that there is usually an explicit check for the chartConfig property. I have copied that here in utils.tsx

Checklist

@mm0 mm0 marked this pull request as ready for review March 9, 2024 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant