-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop delivering previous data in unrelated loading results. (#6566)
Results with loading:true can still provide data from the cache, but they should never provide data from a previous result, especially since the previous result may have been derived from entirely different variables: #6039 (comment) This is potentially a breaking change for code that relied on result.data not being undefined when result.loading is true, but the bugs that this change will fix are much more serious than the inconvenience of checking the truthiness of result.data before using it. Fixes #6039, as verified by the reproduction provided by @davismariotti: https://codesandbox.io/s/changing-variables-demo-obykj
- Loading branch information
Showing
5 changed files
with
62 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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