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 = ({
135135 subscribers [ key ] . pollingInterval ! ,
136136 lowestPollingInterval
137137 )
138- // if (!skipPollOnFocusLost) {
139- skipPollOnFocusLost = subscribers [ key ] . skipPollOnFocusLost
140- // }
138+ skipPollOnFocusLost = subscribers [ key ] . skipPollOnFocusLost
141139 }
142140 }
143141
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import { setupApiStore } from './helpers'
44import type { SubscriptionSelectors } from '../core/buildMiddleware/types'
55import { createListenerMiddleware } from '@reduxjs/toolkit'
66
7-
87const mockBaseQuery = vi
98 . fn ( )
109 . mockImplementation ( ( args : any ) => ( { data : args } ) )
@@ -167,7 +166,7 @@ describe('polling tests', () => {
167166 storeListenerRef . store . dispatch ( api . util . resetApiState ( ) )
168167 } )
169168
170- it ( 'respects skipPollOnFocusLost if any subscription is true ' , async ( ) => {
169+ it ( 'respects skipPollOnFocusLost of the most recent mounted subscription ' , async ( ) => {
171170 const listenerMiddleware = createListenerMiddleware ( )
172171 const storeListenerRef = setupApiStore ( api , undefined , {
173172 middleware : {
You can’t perform that action at this time.
0 commit comments