Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/utils/aotf.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,12 @@
arg._multiple = multiple
arg._required = required
if (arg.defaultValue) {
arg._default = JSON.parse(arg.defaultValue)
// Enum arg values trip up JSON.parse
try {
arg._default = JSON.parse(arg.defaultValue)
} catch (SyntaxError) {
arg._default = arg.defaultValue

Check warning on line 569 in src/utils/aotf.js

View check run for this annotation

Codecov / codecov/patch

src/utils/aotf.js#L569

Added line #L569 was not covered by tests
}
} else {
arg._default = getNullValue(arg.type, types)
}
Expand Down