Skip to content

Commit

Permalink
fix: support undefined value
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Sep 22, 2020
1 parent a6e7c56 commit be9a71c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ if (productionYaml !== undefined && productionYaml.contents !== null) {

for (let i = 0; i < documentItems.length; i++) {
const documentItem = documentItems[i]
const elementItems = documentItem.value.items

if (documentItem.value.type !== 'MAP') {
if (documentItem.value === undefined || documentItem.value.type !== 'MAP') {
continue
}

const elementItems = documentItem.value.items
const contentElementItems = {}

for (let j = 0; j < elementItems.length; j++) {
Expand Down

0 comments on commit be9a71c

Please sign in to comment.