gildas-lormeau/zip.js

The sendErrorMessage function is called with undefined.

negezor opened this issue · 1 comments

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

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")) {