Skip to content

Commit 0544f41

Browse files
authored
fix: suppress string method on undefined error in case of malformed $ref (via #1955)
1 parent 731df8e commit 0544f41

File tree

1 file changed

+1
-1
lines changed
  • src/plugins/validate-semantic/validators/oas3

1 file changed

+1
-1
lines changed

src/plugins/validate-semantic/validators/oas3/refs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const validateOAS3RefsForRequestBodiesReferenceRequestBodyPositions = ()
1010
return acc
1111
}
1212

13-
const [, refPath] = ref.split("#")
13+
const [, refPath = ""] = ref.split("#")
1414
const pathArr = refPath.split("/") || []
1515
const parentRefKey = pathArr.slice(-2)[0]
1616
const targetRefKey = pathArr.slice(-1)[0]

0 commit comments

Comments
 (0)