Commit 6f7fa29
committed
fix(core): make sure erroneous queries refetch when query keys change
the change in shouldFetchOptionally was introduced in #2556 to avoid an infinite loop wen using suspense (see #2187), but it broke the case where we're switching keys between two erroneous queries - they now didn't refetch even though they should
this fix scopes the error check to only usages where suspense is turned on, so that we get the same behaviour as in v3.19.4 for non-suspense users, while still having the fix for suspense users1 parent c956f1a commit 6f7fa29
2 files changed
+82
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
770 | | - | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
771 | 773 | | |
772 | 774 | | |
773 | 775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4056 | 4056 | | |
4057 | 4057 | | |
4058 | 4058 | | |
4059 | | - | |
4060 | 4059 | | |
4061 | 4060 | | |
4062 | | - | |
4063 | | - | |
4064 | | - | |
4065 | | - | |
4066 | | - | |
4067 | | - | |
| 4061 | + | |
| 4062 | + | |
| 4063 | + | |
| 4064 | + | |
| 4065 | + | |
| 4066 | + | |
| 4067 | + | |
| 4068 | + | |
| 4069 | + | |
| 4070 | + | |
| 4071 | + | |
| 4072 | + | |
| 4073 | + | |
| 4074 | + | |
| 4075 | + | |
4068 | 4076 | | |
4069 | | - | |
4070 | | - | |
4071 | | - | |
4072 | | - | |
4073 | | - | |
4074 | | - | |
4075 | | - | |
| 4077 | + | |
4076 | 4078 | | |
4077 | 4079 | | |
4078 | 4080 | | |
| |||
4104 | 4106 | | |
4105 | 4107 | | |
4106 | 4108 | | |
4107 | | - | |
| 4109 | + | |
4108 | 4110 | | |
4109 | 4111 | | |
4110 | 4112 | | |
4111 | | - | |
| 4113 | + | |
| 4114 | + | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
| 4129 | + | |
| 4130 | + | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
| 4140 | + | |
| 4141 | + | |
| 4142 | + | |
| 4143 | + | |
| 4144 | + | |
| 4145 | + | |
| 4146 | + | |
| 4147 | + | |
| 4148 | + | |
| 4149 | + | |
| 4150 | + | |
| 4151 | + | |
| 4152 | + | |
| 4153 | + | |
| 4154 | + | |
| 4155 | + | |
| 4156 | + | |
| 4157 | + | |
| 4158 | + | |
| 4159 | + | |
| 4160 | + | |
| 4161 | + | |
| 4162 | + | |
| 4163 | + | |
| 4164 | + | |
| 4165 | + | |
| 4166 | + | |
| 4167 | + | |
| 4168 | + | |
| 4169 | + | |
| 4170 | + | |
| 4171 | + | |
| 4172 | + | |
| 4173 | + | |
4112 | 4174 | | |
| 4175 | + | |
4113 | 4176 | | |
4114 | 4177 | | |
4115 | 4178 | | |
| |||
0 commit comments