adcc0a15 by David HAN SZE CHUEN

- force string comparison between the input's value (which is always a string) a…

…nd the data model's value
1 parent 468048c0
...@@ -274,7 +274,7 @@ Rivets.binders = ...@@ -274,7 +274,7 @@ Rivets.binders =
274 unbindEvent el, 'change', @currentListener 274 unbindEvent el, 'change', @currentListener
275 routine: (el, value) -> 275 routine: (el, value) ->
276 if el.type is 'radio' 276 if el.type is 'radio'
277 el.checked = el.value is value 277 el.checked = el.value?.toString() is value?.toString()
278 else 278 else
279 el.checked = !!value 279 el.checked = !!value
280 280
...@@ -286,7 +286,7 @@ Rivets.binders = ...@@ -286,7 +286,7 @@ Rivets.binders =
286 unbindEvent el, 'change', @currentListener 286 unbindEvent el, 'change', @currentListener
287 routine: (el, value) -> 287 routine: (el, value) ->
288 if el.type is 'radio' 288 if el.type is 'radio'
289 el.checked = el.value isnt value 289 el.checked = el.value?.toString() isnt value?.toString()
290 else 290 else
291 el.checked = !value 291 el.checked = !value
292 292
......