Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Check worker event data has iterator (#10755)
<!-- 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 focuses on improving the handling of messages received in web workers by adding a check to ensure the data received is an array before destructuring it. This change enhances the robustness of the code by preventing potential errors when processing unexpected message formats. ### Detailed summary - Added a check to verify if `e?.data` is an array before destructuring it into `[eId, data]`. - Maintained the existing logic for resolving or rejecting the promise based on the `data.success` property. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information