Skip to content

Commit 400012e

Browse files
committed
fixup! lib: add cause to DOMException
1 parent 1c5b00f commit 400012e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/per_context/domexception.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class DOMException {
5252
constructor(message = '', options = 'Error') {
5353
ErrorCaptureStackTrace(this);
5454

55-
if (options && typeof options === 'string') {
55+
if (options && typeof options === 'object') {
5656
const { name, cause } = options;
5757
internalsMap.set(this, {
5858
message: `${message}`,

0 commit comments

Comments
 (0)