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(edges-handler): do not access props on null #268

Merged
merged 1 commit into from
Nov 28, 2019

Conversation

Thomaash
Copy link
Member

Data set docs: Item | null.
Data set implementation today: Item | null.
Data set implementation 5 years ago: Item | null.
EdgesHandler.js for the past 5 years:

if (item !== undefined) {
    item[prop]
}

I have no idea why no one noticed this for five years. It either got the
item from the data set or accessed a property on null and crashed.

PS: This has been introduced by a commit saying "updated docs".

Data set docs: `Item | null`.
Data set implementation today: `Item | null`.
Data set implementation 5 years ago: `Item | null`.
EdgesHandler.js for the past 5 years:
```javascript
if (item !== undefined) {
    item[prop]
}
```

I have no idea why no one noticed this for five years. It either got the
item from the data set or accessed a property on null and crashed.

PS: This has been introduced by a commit saying "updated docs".
@Thomaash Thomaash merged commit f093a74 into master Nov 28, 2019
@Thomaash Thomaash deleted the fix-null-prop-access branch November 28, 2019 18:06
@vis-bot
Copy link
Collaborator

vis-bot commented Nov 28, 2019

🎉 This PR is included in version 6.4.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants