Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return function(dispatch, getState) {
let sessionWarningTimeoutId = getState().auth.sessionWarningTimeoutId
log.debug(`Removing warning timeout, id: ${sessionWarningTimeoutId}`)
try {
workerTimers.clearTimeout(getState().auth.sessionWarningTimeoutId)
} catch(err) {
console.log(`Failed to clear session warning timeout, id=${sessionWarningTimeoutId}`)
console.log(err)
}
dispatch(removeSessionWarningTimeoutId())
}
}