Skip to content

Commit

Permalink
fix: typeof will always return a string therefore fallback is never c…
Browse files Browse the repository at this point in the history
…alled
  • Loading branch information
lucasnetau committed Sep 14, 2023
1 parent 33e504e commit 4ca0dc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ function FormBuilder(opts, element, $) {
['array', ({ options }) => !!options],
['boolean', ({ type }) => type === 'checkbox'], // automatic bool if checkbox
[typeof attrData.value, () => true], // string, number,
].find(typeCondition => typeCondition[1](attrData))[0] || 'string'
].find(typeCondition => typeCondition[1](attrData))[0]
)
}

Expand Down

0 comments on commit 4ca0dc9

Please sign in to comment.