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

LinkedList should error out on empty list remove #42

Merged
merged 1 commit into from
Oct 12, 2016

Conversation

iamricard
Copy link
Contributor

Closes #41

@@ -1086,6 +1086,10 @@ class LinkedList {
*/

remove(position) {
// We should not be able to remove from an empty list
if (!head) {
Copy link
Owner

Choose a reason for hiding this comment

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

this.head

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@jamiebuilds jamiebuilds merged commit 6995560 into jamiebuilds:master Oct 12, 2016
@iamricard iamricard deleted the 41-error-on-remove-ll branch October 16, 2016 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants