I've solved this problem by changing this:
someNumber = someNumber.toFixed(2) ...to this:
someNumber = +someNumber.toFixed(2); However this will convert the number to a string and parse it again, which will have a significant impact on performance. If you care about performance or type safety, check the the other questionsanswers as well.