Skip to content

Commit a80e4e2

Browse files
committed
Use optional chaining
1 parent f7ea5c5 commit a80e4e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parser/deserializer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ function deserializeObject(
241241

242242
// shouldValidateKey is true if the key should be validated, false otherwise
243243
let shouldValidateKey = true;
244-
if (globalUTFValidation || (utf8KeysSet && utf8KeysSet.has(name))) {
244+
if (globalUTFValidation || utf8KeysSet?.has(name)) {
245245
shouldValidateKey = validationSetting;
246246
} else {
247247
shouldValidateKey = !validationSetting;

0 commit comments

Comments
 (0)