Skip to content

Commit

Permalink
When enum length is 1, set selectedIndex to 0
Browse files Browse the repository at this point in the history
 instead of 1
  • Loading branch information
nagarajanchinnasamy authored Aug 24, 2017
1 parent 126a8d4 commit 8e0498d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/brutusin-json-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ if (typeof brutusin === "undefined") {
}
}
if (s.enum.length === 1)
input.selectedIndex = 1;
input.selectedIndex = 0;
else
input.selectedIndex = selectedIndex;
} else {
Expand Down

0 comments on commit 8e0498d

Please sign in to comment.