Skip to content

Commit 3d1986f

Browse files
committed
fix: adjust data retrieval logic to use BUFFER_ROW_COUNT for improved configurability
1 parent 3df5488 commit 3d1986f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

handler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ function getData() {
3838
let currentRowCount = sheetData.getLastRow();
3939
let data = sheetData
4040
.getRange(
41-
/* row */ Math.max(currentRowCount - 74, 0),
41+
/* row */ Math.max(currentRowCount - BUFFER_ROW_COUNT - 1, 2),
4242
/* column */ 1,
43-
/* numRows */ currentRowCount,
43+
/* numRows */ Math.min(currentRowCount, BUFFER_ROW_COUNT),
4444
/* numColumns */ 4
4545
)
4646
.getValues();

0 commit comments

Comments
 (0)