Skip to content

Commit 5991113

Browse files
authored
chore(pass-style): Avoid unexpected errors (#2960)
1 parent e71faf4 commit 5991113

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/pass-style/src/passStyle-helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const makeConfirmTagRecord = confirmProto => {
162162
(reject && reject`An array cannot be a tagRecord: ${tagRecord}`)) &&
163163
confirmPassStyle(
164164
tagRecord,
165-
confirmOwnDataDescriptor(tagRecord, PASS_STYLE, false, reject).value,
165+
confirmOwnDataDescriptor(tagRecord, PASS_STYLE, false, reject)?.value,
166166
expectedPassStyle,
167167
reject,
168168
) &&
@@ -171,7 +171,7 @@ const makeConfirmTagRecord = confirmProto => {
171171
Symbol.toStringTag,
172172
false,
173173
reject,
174-
).value === 'string' ||
174+
)?.value === 'string' ||
175175
(reject &&
176176
reject`A [Symbol.toStringTag]-named property must be a string: ${tagRecord}`)) &&
177177
confirmProto(tagRecord, getPrototypeOf(tagRecord), reject)

0 commit comments

Comments
 (0)