This repository was archived by the owner on Oct 2, 2021. It is now read-only.
Clearing the context immediately to avoid sending multiple remove eve…#318
Merged
roblourens merged 1 commit intomicrosoft:masterfrom Apr 2, 2018
Merged
Conversation
…nts in case of quick refreshes
Member
|
@rakatyal I won't merge it this week because we are about to ship vscode. Do you need it published right away? If so, I can merge it to another branch and publish. Just let me know... |
Contributor
Author
|
@roblourens: Okay. So when can we merge this earliest and get it published via master? |
Member
|
End of this week? |
Contributor
Author
|
Okay I think that will be all right. If we can merge and publish this by EOD tomorrow we will have a week to see we didn't regress anything. Can we do that? |
Contributor
Author
|
@roblourens: Can we merge and publish this today? |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
…nts in case of quick refreshes
When we have a case of multiple refreshes in the browser in a quick succession, sometimes we have a case where we don't reach the point of clearing the context and, in turn _scriptById, while sending out 'remove' events from the previous refresh.
In this scenario, the subsequent refresh gets the _scriptsById of the previous state and we end up sending multiple remove events for the same script causing PineZorro to throw an error.
We should clear the context as soon as we populate the cachedScriptParsedEvents array.