Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Load polyfill only when timeout not available (#10817)
<!-- Before opening a pull request, please read the [contributing guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md) first --> <!-- start pr-codex --> --- ## PR-Codex overview This PR updates the `abortcontroller-polyfill.ts` file to load the polyfill asynchronously. It ensures that the `AbortSignal` timeout functionality is defined only after the polyfill is successfully loaded, enhancing error handling for the polyfill loading process. ### Detailed summary - Replaced synchronous polyfill definition with asynchronous loading using `import()`. - Added a `.then()` block to define `timeoutFN` only after successful loading of the polyfill. - Included a `.catch()` block to log an error message if the polyfill fails to load. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information