summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/error_021_stack_method.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/error_021_stack_method.ts')
-rw-r--r--cli/tests/testdata/error_021_stack_method.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/tests/testdata/error_021_stack_method.ts b/cli/tests/testdata/error_021_stack_method.ts
index a52d00deb..b6ebe1f5e 100644
--- a/cli/tests/testdata/error_021_stack_method.ts
+++ b/cli/tests/testdata/error_021_stack_method.ts
@@ -7,6 +7,8 @@ class A {
try {
new A().m();
} catch (error) {
- console.log(error.stack);
+ if (error instanceof Error) {
+ console.log(error.stack);
+ }
throw error;
}