File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
packages/toolkit/src/query Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -135,9 +135,7 @@ export const buildPollingHandler: InternalHandlerBuilder = ({
135
135
subscribers [ key ] . pollingInterval ! ,
136
136
lowestPollingInterval
137
137
)
138
- // if (!skipPollOnFocusLost) {
139
- skipPollOnFocusLost = subscribers [ key ] . skipPollOnFocusLost
140
- // }
138
+ skipPollOnFocusLost = subscribers [ key ] . skipPollOnFocusLost
141
139
}
142
140
}
143
141
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import { setupApiStore } from './helpers'
4
4
import type { SubscriptionSelectors } from '../core/buildMiddleware/types'
5
5
import { createListenerMiddleware } from '@reduxjs/toolkit'
6
6
7
-
8
7
const mockBaseQuery = vi
9
8
. fn ( )
10
9
. mockImplementation ( ( args : any ) => ( { data : args } ) )
@@ -167,7 +166,7 @@ describe('polling tests', () => {
167
166
storeListenerRef . store . dispatch ( api . util . resetApiState ( ) )
168
167
} )
169
168
170
- it ( 'respects skipPollOnFocusLost if any subscription is true ' , async ( ) => {
169
+ it ( 'respects skipPollOnFocusLost of the most recent mounted subscription ' , async ( ) => {
171
170
const listenerMiddleware = createListenerMiddleware ( )
172
171
const storeListenerRef = setupApiStore ( api , undefined , {
173
172
middleware : {
You can’t perform that action at this time.
0 commit comments