Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit 4406ae9

Browse files
authored
fix(networking): Protect against empty timer (#1039 by @odjhey)
1 parent 6c1e29b commit 4406ae9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugins/networking.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default <ReactotronSubtype = ReactotronCore>(pluginConfig: NetworkingOpti
7676

7777
// fetch and clear the request data from the cache
7878
const rid = xhr._trackingName
79-
const cachedRequest = requestCache[rid] || {}
79+
const cachedRequest = requestCache[rid] || { xhr }
8080
requestCache[rid] = null
8181

8282
// assemble the request object
@@ -112,7 +112,7 @@ export default <ReactotronSubtype = ReactotronCore>(pluginConfig: NetworkingOpti
112112
}
113113

114114
// send this off to Reactotron
115-
;(reactotron as any).apiResponse(tronRequest, tronResponse, stopTimer()) // TODO: Fix
115+
;(reactotron as any).apiResponse(tronRequest, tronResponse, stopTimer ? stopTimer() : null) // TODO: Fix
116116
}
117117

118118
// can we use the real response?

0 commit comments

Comments
 (0)