Skip to content

Commit 873ee6a

Browse files
committed
Add null check for row field in footer calculations
1 parent 57c4b9a commit 873ee6a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

options/footer-style.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
const field = this.field
5151

5252
return `$${data.map(function (row) {
53-
return +row[field].substring(1)
53+
return row[field] ? +row[field].substring(1) : 0
5454
}).reduce(function (sum, i) {
5555
return sum + i
5656
}, 0)}`

options/show-footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
const field = this.field
5151

5252
return `$${data.map(function (row) {
53-
return +row[field].substring(1)
53+
return row[field] ? +row[field].substring(1) : 0
5454
}).reduce(function (sum, i) {
5555
return sum + i
5656
}, 0)}`

0 commit comments

Comments
 (0)