fix: default to empty object for pathItems in updateJsonSpec wrap-action (#4785)
cc #4784
This commit is contained in:
@@ -12,7 +12,7 @@ export const updateJsonSpec = (ori, {specActions}) => (...args) => {
|
|||||||
|
|
||||||
// Trigger resolution of any path-level $refs.
|
// Trigger resolution of any path-level $refs.
|
||||||
const [json] = args
|
const [json] = args
|
||||||
const pathItems = get(json, ["paths"])
|
const pathItems = get(json, ["paths"]) || {}
|
||||||
const pathItemKeys = Object.keys(pathItems)
|
const pathItemKeys = Object.keys(pathItems)
|
||||||
|
|
||||||
pathItemKeys.forEach(k => {
|
pathItemKeys.forEach(k => {
|
||||||
|
|||||||
Reference in New Issue
Block a user