Skip to content

Commit 0d2fafb

Browse files
authored
fix: edge case for solid plugin (#44)
1 parent 6caa020 commit 0d2fafb

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/error.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,17 @@ export function makeErrorForHideStackFrame<B extends new (...args: any[]) => Err
5454
get errorStack() {
5555
return this.#hiddenStack;
5656
}
57+
}
5758

58-
// This is a workaround for wpt tests that expect that the error
59-
// constructor has a `name` property of the base class.
60-
get ["constructor"]() {
59+
// This is a workaround for wpt tests that expect that the error
60+
// constructor has a `name` property of the base class.
61+
Object.defineProperty(HideStackFramesError.prototype, "constructor", {
62+
get() {
6163
return clazz;
62-
}
63-
}
64+
},
65+
enumerable: false,
66+
configurable: true,
67+
});
6468

6569
return HideStackFramesError as any;
6670
}

0 commit comments

Comments
 (0)