Commit 305fb6c
fix: actaully reset 'injectedKeys' (#2456)
* refactor: Remove single-use variable
* fix: actaully reset 'injectedKeys'
Re-assigning the local variable `injectedKeys` would not change `sandbox.injectedKeys`, thus `restoreContext` doesn't fully restore the context.
See:
https://lgtm.com/projects/g/sinonjs/sinon/snapshot/9e09e7d79bac5808ca98fac4f7419a20be4fc43d/files/lib/sinon/sandbox.js?sort=name&dir=ASC&mode=heatmap#x9f770d565ef51b7d:1
* Update lib/sinon/sandbox.js
Co-authored-by: Phred Lane <[email protected]>
---------
Co-authored-by: Phred Lane <[email protected]>1 parent 8186280 commit 305fb6c
1 file changed
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
| 200 | + | |
204 | 201 | | |
205 | 202 | | |
206 | 203 | | |
207 | | - | |
208 | | - | |
| 204 | + | |
| 205 | + | |
209 | 206 | | |
210 | 207 | | |
211 | | - | |
| 208 | + | |
212 | 209 | | |
213 | 210 | | |
214 | 211 | | |
| |||
0 commit comments