Skip to content

Commit

Permalink
Don't cleanup pending preload queries when you're server rendering
Browse files Browse the repository at this point in the history
Reviewed By: fullstackhacker

Differential Revision: D30794216

fbshipit-source-id: 31cc65c5bdd6b907908af565d89ab49a44819bad
  • Loading branch information
steveluscher authored and facebook-github-bot committed Sep 7, 2021
1 parent 0f1e7d7 commit 551dd2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-relay/relay-hooks/preloadQuery_DEPRECATED.js
Expand Up @@ -112,6 +112,9 @@ function preloadQuery<TQuery: OperationType, TEnvironmentProviderOptions>(
}
return () => {
subscription?.unsubscribe();
if (environment.isServer()) {
return;
}
if (
RelayFeatureFlags.DELAY_CLEANUP_OF_PENDING_PRELOAD_QUERIES ===
true
Expand Down

0 comments on commit 551dd2d

Please sign in to comment.