Skip to content

Commit

Permalink
release: v1.37.1
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Jan 28, 2023
1 parent 1d61d16 commit fef6f1f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.37.1 (28 Jan 2023)

* fix(uncaught): worker error null

## v1.37.0 (20 Jul 2022)

* feat(container): memUsage, memLoad
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "licia",
"version": "1.37.0",
"version": "1.37.1",
"description": "Useful utility collection with zero dependencies",
"bin": {
"licia": "./bin/licia.js"
Expand Down
9 changes: 8 additions & 1 deletion src/uncaught.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ SingleEmitter.mixin(exports);

if (isBrowser) {
window.addEventListener('error', event => {
callListeners(event.error);
if (event.error) {
callListeners(event.error);
} else if (event.message) {
// errors from worker
const e = new Error(event.message);
e.stack = `Error: ${event.message} \n at ${event.filename}:${event.lineno}:${event.colno}`;
callListeners(e);
}
});
window.addEventListener('unhandledrejection', e => {
callListeners(e.reason);
Expand Down

0 comments on commit fef6f1f

Please sign in to comment.