Skip to content

Commit 1ceeb93

Browse files
author
tombertrand
committed
Fix rawFilter sum
1 parent 58b9fc0 commit 1ceeb93

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

server/api/historyFilters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ const getHistoryFilters = async ({ account, filters: rawFilters }) => {
190190
.toArray();
191191
// .explain();
192192

193-
if (toBoolean(rawFilters.sum)) {
193+
if (rawFilters && toBoolean(rawFilters.sum)) {
194194
data.forEach(({ amount }) => {
195195
sum = new BigNumber(sum).plus(amount || 0).toNumber();
196196
});

server/sentry.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ const Sentry = require("@sentry/node");
22

33
Sentry.init({
44
dsn: process.env.SENTRY_DNS,
5+
beforeSend: (event, hint) => {
6+
if (process.env.NODE_ENV === "development") {
7+
console.error(hint.originalException || hint.syntheticException);
8+
return null;
9+
}
10+
return event;
11+
},
512
});
613

714
process.on("uncaughtException", err => {

0 commit comments

Comments
 (0)