Skip to content

Commit 0436b2c

Browse files
committed
fix for undefined budgetAmount
1 parent 98d87c9 commit 0436b2c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

widgets/src/components/HomeGrantList.js

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export function HomeGrantList({ default_entries = 3 }) {
3131
}
3232

3333
const parseBudgetAmount = (budgetStr) => {
34+
if (!budgetStr) return -1
35+
3436
const numStr = budgetStr.replace(/^[$£]|\s/g, '')
3537

3638
return parseFloat(numStr.replace(/\./g, '').replace(',', '.'))

0 commit comments

Comments
 (0)