Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The goal here is to sum values if they are numbers (as with distance, duration, count) and sum objects' properties if values are objects. But I forgot to consider the case where val is null or undefined, in which case isNaN(val) would be true. Better to check if value is a number by !isNaN(val), then check if it's an object. Otherwise do nothing because it's null or undefined.
- Loading branch information