Closed arj03 closed 11 years ago
Thanks.
Could you clarify what use case this change enables? It looks like it would block you from passing an array or date into ko.track
, but under what scenario would somebody be doing that anyway?
Someone not reading the documentation :-) I was looking at the code and the check just looked wrong, I have been bitten by the typeof error before ;-)
OK, I'll close this, but let me know if you think of another reason why it should be changed :)
Thanks
Well I'm wondering what the original check was for, if it was not for giving a proper error to people who havn't read the documentation? It must have worked for ordinary numbers, but it would make sense that it also worked for arrays.
At least, as it is now it seems incomplete. In which case it seems better to remove the two line check altogether.
Fixes passing an array or date to ko.track. I'm not 100% sure if they check should also be applied to the getObservable function.