Skip to content

Make remove() flexible by allowing non-Things to be removed #127

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

Merged
merged 1 commit into from
Feb 21, 2022

Conversation

anderoonies
Copy link
Contributor

Resolves #121

Summary

This fixes an inconsistency between the legacy version of this library and the current version. In the legacy version, calling remove(x) if x === undefined would not error. Due to the way that removal works in this version, this would throw.

Changes:

  • Add guards for removing undefined or non-Things

Checklist

  • npm test passes
  • Unit tests are included / updated
  • Documentation has been updated where relevant

@anderoonies anderoonies merged commit 7964598 into codehs:main Feb 21, 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.

remove(element) throws if element is undefined
1 participant