Skip to content

Commit fe5b234

Browse files
authored
fix: default to empty object for pathItems in updateJsonSpec wrap-action (#4785)
cc #4784
1 parent 5431eed commit fe5b234

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/plugins/spec/wrap-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const updateJsonSpec = (ori, {specActions}) => (...args) => {
1212

1313
// Trigger resolution of any path-level $refs.
1414
const [json] = args
15-
const pathItems = get(json, ["paths"])
15+
const pathItems = get(json, ["paths"]) || {}
1616
const pathItemKeys = Object.keys(pathItems)
1717

1818
pathItemKeys.forEach(k => {

0 commit comments

Comments
 (0)