added conditional in testUniqueness to check parentNode exists#39
Open
jasan-s wants to merge 1 commit intoericclemmons:masterfrom
Open
added conditional in testUniqueness to check parentNode exists#39jasan-s wants to merge 1 commit intoericclemmons:masterfrom
jasan-s wants to merge 1 commit intoericclemmons:masterfrom
Conversation
|
How does this PR fixes the problem? What should I expect it to return when parentElement is removed from the DOM? |
Author
|
@omergulen it fixes the problem of error being thrown that caused App crash. Pre this PR if element no longer exists in DOM , exception was being thrown. It doesn't return a unique selector because it no longer exists in the DOM. |
|
How do you think I can work around this problem? I mean, I need to get a selector from the DOM before it is removed, is there any way to achieve it? |
… calling querySelectorAll
33cf2bc to
3dfc734
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
added conditional in testUniqueness to check parentNode exists before calling querySelectorAll.
reason for fix: using it in react with "click" event listener. a element was removed on its own click caused error.