Commit 5b869c1
fix(openapi-resource-mocks): catch mode no longer disrupts existing mock value on enable
Previously, enabling catch mode immediately called setLoading() on the current ref,
blowing away any resolved value before a new request had even fired. Now setCatchMode
only registers the key — the existing onRequest listener already handles interception
when the next actual request fires. Also removed the stale re-intercept logic in the
reset control handler, and unified applyBehavior into a single onRequest listener so
reload correctly re-applies initialBehavior when catch mode is off.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 4987022 commit 5b869c1
2 files changed
Lines changed: 13 additions & 26 deletions
Lines changed: 2 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 63 | + | |
70 | 64 | | |
71 | 65 | | |
72 | 66 | | |
| |||
196 | 190 | | |
197 | 191 | | |
198 | 192 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 193 | + | |
210 | 194 | | |
211 | 195 | | |
212 | 196 | | |
| |||
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
60 | 69 | | |
61 | 70 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
79 | | - | |
| 83 | + | |
80 | 84 | | |
81 | | - | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
0 commit comments