Skip to content

Commit e73de57

Browse files
authored
Merge pull request #8 from JaredAAT/convert-numbers-correctly
default to 1 if NaN
2 parents a86b55a + 6f3ed59 commit e73de57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Convertor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class Convertor {
115115

116116
if (schema.type === 'number' || schema.type === 'integer') {
117117
if (typeof schema.default === 'string') {
118-
schema.default = parseInt(schema.default, 10)
118+
schema.default = parseInt(schema.default, 10) || 1
119119
}
120120
}
121121

0 commit comments

Comments
 (0)