Skip to content

Commit 71f5663

Browse files
committed
fix: crash on invalid or empty overlay document
1 parent e457098 commit 71f5663

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/overlay.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import mergician from 'mergician';
55

66
function applyOverlayToOpenAPI(spec, overlay) {
77
// Use jsonpath.apply to do the changes
8-
overlay.actions.forEach((a)=>{
8+
if (overlay.actions && overlay.actions.length >= 1) overlay.actions.forEach((a)=>{
99
// Is it a remove?
1010
if (a.hasOwnProperty('remove')) {
1111
while(true) {

0 commit comments

Comments
 (0)