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 race condition on deleting clickedItem #483

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

odinho
Copy link

@odinho odinho commented Oct 11, 2016

If you have some code removing all items before the timeout is
able to run, you'll get a nasty TypeError if you don't null check
clickedItem.

If you have some code removing all items before the timeout is
able to run, you'll get a nasty TypeError if you don't null check
clickedItem.
@odinho
Copy link
Author

odinho commented Oct 11, 2016

I saw a lot of this error when trying to make our selenium tests be free of console errors. The exception message in Opera and Chromium-based browsers is:

TypeError: Cannot convert undefined or null to object

@isteven
Copy link
Owner

isteven commented Oct 12, 2016

@odinho ,

Thanks for the PR. Can you ensure that this breaks none of the existing functionalities? If all are OK, I'm going to merge it.

@odinho
Copy link
Author

odinho commented Jul 18, 2018

I never got to write full tests. But it did not break any of the internal tests for Hola when I worked there, and this patch was (and still is) used for all their web pages and control panels. So it has seen a lot of use.

It shouldn't break something, but then maybe it will.

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