Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onError: (err, store) => {
const isQuotaModalOpen = !!getOpenModals(store.getState())['QuotaExceededModal']
if (err instanceof DOMException && err.name === 'QuotaExceededError' && !isQuotaModalOpen) {
store.dispatch(openModal('QuotaExceededModal'))
}
}
})