development-and-dinosaurs / planning-poker

Planning Poker application for agile refinement ceremonies
MIT License
2 stars 0 forks source link

[BUG] Room crashes when revealing votes if no one has voted #9

Closed Tyrannoseanus closed 11 months ago

Tyrannoseanus commented 11 months ago

If no one has voted and someone clicks the "Reveal votes" button, the room will crash and kick everyone out.

This is caused by the mean being calculated on the server, where it results in NaN in cases where no one has voted. This doesn't serialise correctly due to the JSON specification not allowing this value.

We could turn off strict JSON serialisation and send NaN, or we could handle the NaN result on the server and send 0 instead.

We could put some client code in place that doesn't allow votes to be revealed until everyone / someone has voted, but this could be in addition.

Tyrannoseanus commented 11 months ago

Closed in #7