Skip to content
Snippets Groups Projects
Commit 696a0943 authored by Tom French's avatar Tom French Committed by James Long
Browse files

fix: replace custom isInteger function with Number.isInteger

parent 4421f2a1
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment