Skip to content

Commit

Permalink
Fixed issue with numeric values in radio binding (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
faulknercs committed Jul 1, 2017
1 parent dfb7dc4 commit 75c375b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bindings/radioBinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ko.bindingHandlers.radio = {

update: function (element, valueAccessor) {
var value = ko.unwrap(valueAccessor()) || '',
$radioButton = $(element).find('input[value="' + value.replace(/"/g, '\\"') + '"]'),
$radioButton = $(element).find('input[value="' + value.toString().replace(/"/g, '\\"') + '"]'),
$radioButtonWrapper;

if ($radioButton.length) {
Expand Down

0 comments on commit 75c375b

Please sign in to comment.