Skip to content

Commit

Permalink
merge default values
Browse files Browse the repository at this point in the history
  • Loading branch information
ekhaled committed Sep 8, 2021
1 parent 7c4bbe3 commit 6fd4ab8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ function mergeItems(itemType, currentItem, newItem, ignoreLocations) {
currentItem.description = newItem.description;
}

if (!currentItem.defaultValue && newItem.defaultValue) {
currentItem.defaultValue = newItem.defaultValue;
}

if (!currentItem.type || currentItem.type.type === 'any') {
if (newItem.type && newItem.type.type !== 'any') {
currentItem.type = newItem.type;
Expand Down

0 comments on commit 6fd4ab8

Please sign in to comment.