Skip to content

Commit 99abc26

Browse files
lukasikpPaulina Lukasik
andauthored
fix(validate-semantic): suppress TypeError when reading operationId (#3769)
Definition author can define Operation Object as null. This commit fixes this edge-case. Co-authored-by: Paulina Lukasik <[email protected]>
1 parent 72fc20c commit 99abc26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugins/validate-semantic/validators/2and3/operations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const validate2And3OperationHasUniqueId = () => sys => {
66
return nodes.reduce((acc, node) => {
77
const value = node.node
88

9-
const id = value.operationId
9+
const id = value?.operationId
1010

1111
if (id) {
1212
if (seen.indexOf(id) > -1) {

0 commit comments

Comments
 (0)