fix: replace custom isInteger function with Number.isInteger
This commit is contained in:
parent
4421f2a173
commit
696a094303
1 changed files with 1 additions and 5 deletions
|
@ -10,10 +10,6 @@ import {
|
|||
import q from '../shared/query';
|
||||
import { currencyToAmount, amountToInteger } from '../shared/util';
|
||||
|
||||
function isInteger(num) {
|
||||
return (num | 0) === num;
|
||||
}
|
||||
|
||||
export function getAccountFilter(accountId, field = 'account') {
|
||||
if (accountId) {
|
||||
if (accountId === 'budgeted') {
|
||||
|
@ -82,7 +78,7 @@ export function makeTransactionSearchQuery(currentQuery, search, dateFormat) {
|
|||
amount: { $transform: '$abs', $eq: amountToInteger(amount) }
|
||||
},
|
||||
amount != null &&
|
||||
isInteger(amount) && {
|
||||
Number.isInteger(amount) && {
|
||||
amount: {
|
||||
$transform: { $abs: { $idiv: ['$', 100] } },
|
||||
$eq: amount
|
||||
|
|
Loading…
Reference in a new issue