Skip to content

Commit

Permalink
fix: Fixed accessing properties when err is null in onerror handler
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnester committed Jun 29, 2022
1 parent ce068ac commit 3b62a07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/ace/worker/v2/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ define(function (require, exports, module) {
type: "error",
data: {
message: message,
data: err.data,
data: err && err.data,
file: file,
line: line,
col: col,
stack: err.stack
stack: err && err.stack
}
});
};
Expand Down
4 changes: 2 additions & 2 deletions lib/ace/worker/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ window.ace = window;
window.onerror = function(message, file, line, col, err) {
postMessage({type: "error", data: {
message: message,
data: err.data,
data: err && err.data,
file: file,
line: line,
col: col,
stack: err.stack
stack: err && err.stack
}});
};

Expand Down

0 comments on commit 3b62a07

Please sign in to comment.