From fe5b2344c752e050c33c973507f599836052674f Mon Sep 17 00:00:00 2001 From: kyle Date: Thu, 2 Aug 2018 20:34:51 -0700 Subject: [PATCH] fix: default to empty object for pathItems in `updateJsonSpec` wrap-action (#4785) cc #4784 --- src/core/plugins/spec/wrap-actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/plugins/spec/wrap-actions.js b/src/core/plugins/spec/wrap-actions.js index 52347318..69700d62 100644 --- a/src/core/plugins/spec/wrap-actions.js +++ b/src/core/plugins/spec/wrap-actions.js @@ -12,7 +12,7 @@ export const updateJsonSpec = (ori, {specActions}) => (...args) => { // Trigger resolution of any path-level $refs. const [json] = args - const pathItems = get(json, ["paths"]) + const pathItems = get(json, ["paths"]) || {} const pathItemKeys = Object.keys(pathItems) pathItemKeys.forEach(k => {