mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-12 14:51:58 -05:00
cdaf55c7da
Revert "Remove IE11 polyfills and update browser support policy" GitOrigin-RevId: fa44a6bfa796d191446956e94d9e533a70e59da4
14 lines
301 B
JavaScript
14 lines
301 B
JavaScript
import 'abort-controller/polyfill'
|
|
import { useEffect, useState } from 'react'
|
|
|
|
export default function useAbortController() {
|
|
const [controller] = useState(() => new AbortController())
|
|
|
|
useEffect(() => {
|
|
return () => {
|
|
controller.abort()
|
|
}
|
|
}, [controller])
|
|
|
|
return controller
|
|
}
|