Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix add missing helper function to SSR: isNumber #1453

Merged
merged 2 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ way to update this template, but currently, we follow a pattern:

## Upcoming version 2020-XX-XX

- [fix] Add missing helper: isNumber. Used when Number.MAX_SAFE_INTEGER is reached.
[#1453](https://github.com/sharetribe/ftw-daily/pull/1453)
- [fix] minutesBetween: remove thrown an error on negative diff.
[#1444](https://github.com/sharetribe/ftw-daily/pull/1444)
- [fix] TransactionPanel: fix typo [#1451](https://github.com/sharetribe/ftw-daily/pull/1451)
Expand Down
5 changes: 5 additions & 0 deletions server/api-util/currency.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ const convertDivisorToDecimal = divisor => {
}
};

// Check if the value is a number
const isNumber = value => {
return typeof value === 'number' && !isNaN(value);
};

// Detect if the given value is a goog.math.Long object
// See: https://google.github.io/closure-library/api/goog.math.Long.html
const isGoogleMathLong = value => {
Expand Down