Skip to content

Commit a0de56f

Browse files
Update src/features/sidebar/data/useDiff.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ebc4979 commit a0de56f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/features/sidebar/data/useDiff.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ export default function useDiff() {
2121

2222
let isCancelled = false
2323

24-
Promise.resolve().then(() => {
25-
if (isCancelled) {
26-
return
27-
}
24+
if (isCancelled) {
25+
return
26+
}
2827

29-
setLoading(true)
30-
setError(null)
31-
setData(null)
32-
})
28+
setLoading(true)
29+
setError(null)
30+
setData(null)
3331

3432
fetch(diffUrl)
3533
.then(res => res.json())

0 commit comments

Comments
 (0)