Skip to content

Commit 7619977

Browse files
committed
Fix timeouts to not fire in server-like evironments
Fixes TanStack#381
1 parent 3eafb40 commit 7619977

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.2.8
4+
5+
- Fixed an issue where stale and garbage collection timeouts would fire in server-like environments
6+
37
## 1.2.7
48

59
- Imported types from Definitely Typed to repo

src/queryCache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export function makeQueryCache() {
122122

123123
// If the query started with data, schedule
124124
// a stale timeout
125-
if (query.state.data) {
125+
if (!isServer && query.state.data) {
126126
query.scheduleStaleTimeout()
127127

128128
// Simulate a query healing process

0 commit comments

Comments
 (0)