projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1936b44
)
[browser] avoid undefined stack (#80707)
author
Pavel Savara
<pavel.savara@gmail.com>
Tue, 17 Jan 2023 11:08:46 +0000
(12:08 +0100)
committer
GitHub
<noreply@github.com>
Tue, 17 Jan 2023 11:08:46 +0000
(12:08 +0100)
src/mono/wasm/runtime/logging.ts
patch
|
blob
|
history
diff --git
a/src/mono/wasm/runtime/logging.ts
b/src/mono/wasm/runtime/logging.ts
index cdb2d00dba723dd2996685c5d52392ec54d16a32..4a2f0e326255ec1b3d5c81b1da83cbf24bf70f93 100644
(file)
--- a/
src/mono/wasm/runtime/logging.ts
+++ b/
src/mono/wasm/runtime/logging.ts
@@
-62,8
+62,8
@@
export function mono_wasm_symbolicate_string(message: string): string {
export function mono_wasm_stringify_as_error_with_stack(err: Error | string): string {
let errObj: any = err;
- if (!(errObj instanceof Error)) {
- errObj = new Error(errObj);
+ if (!
errObj || !errObj.stack || !
(errObj instanceof Error)) {
+ errObj = new Error(errObj
|| "Unknown error"
);
}
// Error