TurkServer / turkserver-meteor

Web-based, real-time behavioral studies and experiments using Meteor
http://turkserver.readthedocs.io
MIT License
90 stars 23 forks source link

Asst.getPayment returns "0.0" when no payment #80

Closed josephcc closed 8 years ago

josephcc commented 8 years ago

Assigmnet.getPayment should return 0.0 when no payment is set instead of undefined

mizzao commented 8 years ago

How about just this?

return Assignments.findOne(this.asstId).bonusPayment || 0;
mizzao commented 8 years ago

Also FYI, comparison with undefined/null is one of the few times where one might want to use == in JavaScript: https://contribute.jquery.org/style-guide/js/#equality

mizzao commented 8 years ago

@josephcc - do you know how to do a git rebase -i ? :)

Not to be nitpicky, but this is probably one of the good times to do it: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History

Can you squash those 2 commits and merge this to master?