This repository was archived by the owner on Sep 5, 2024. It is now read-only.
fix(toast): remove the interim element from the list before closing element #11427
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.
Check if the interim element is valid before proceeding.
Fixes #10715
PR Checklist
Please check that your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
At the moment the interim element is being removed from the list after new hideAction promise is created for it. In addition no extra check is made for the interim object before it is used.
This is causing an error as undefined object is trying be accessed.
Issue Number: #10715
What is the new behavior?
The interim element is removed from the list before the closeElement method is called.
An extra check is added at the beginning of that method to make sure the interim element is a valid object.
Does this PR introduce a breaking change?
Other information