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 undefined data point handling #65

Merged
merged 1 commit into from
Jul 11, 2022
Merged

Conversation

mainettis
Copy link
Contributor

@mainettis mainettis commented Jul 8, 2022

Changed to find the first defined data item and use it to establish first position. Index can also be used to more accurately check if the data is an object type.
ref #34

var xy = false
if (dataset.data && typeof dataset.data[0] === 'object') xy = true

The above was replaced because the condition returns a boolean so we don't need an if statement to fill the boolean. Also, by this point dataset.data has already been checked and/or accessed, so we only need to check if a defined value is an object type.

Is there a reason not to terminate lines with ;?

Copy link
Owner

@Makanz Makanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR. Looks good!

Regarding not ending lines with ; is because a misconfiguration of prettier. I will fix that.

@Makanz Makanz merged commit bebff0a into Makanz:main Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants