Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The sendErrorMessage function is called with undefined. #439

Closed
negezor opened this issue Aug 7, 2023 · 1 comment
Closed

The sendErrorMessage function is called with undefined. #439

negezor opened this issue Aug 7, 2023 · 1 comment

Comments

@negezor
Copy link

negezor commented Aug 7, 2023

Hi, I've discovered an intermittent bug that is only fixed by reloading the browser.

Uncaught (in promise) TypeError: Cannot destructure property 'message' of 'e' as it is undefined.
    at Pe (49d3298e-9912-4393-a26f-6a7894623a15:1:13914)
    at De (49d3298e-9912-4393-a26f-6a7894623a15:1:13750)
Pe @ 49d3298e-9912-4393-a26f-6a7894623a15:1
De @ 49d3298e-9912-4393-a26f-6a7894623a15:1
await in De (async)
(anonymous) @ 49d3298e-9912-4393-a26f-6a7894623a15:1

image_2023-08-07_19-58-01
The only place I found in the code that refers to this error is here

} catch (error) {
sendErrorMessage(error);
}

Versions
@zip.js/zip.js: 2.7.20
Chrome: 115.0.5790.171

@gildas-lormeau
Copy link
Owner

gildas-lormeau commented Aug 7, 2023

Thank you for the report. I added a default value for the parameter passed to sendErrorMessage() in the version 2.7.21.

function sendErrorMessage(error = new Error("Unknown error")) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants