Skip to content

Commit bde34dc

Browse files
Fix bug with empty rows
1 parent 1c2a0e9 commit bde34dc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

mavo-gsheets.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Google Sheets backend plugin for Mavo
55
* @author Dmitry Sharabin and contributors
6-
* @version 1.0.4
6+
* @version 1.0.5
77
*/
88

99
(($, $f) => {
@@ -228,7 +228,14 @@
228228
// Search for the first fully empty row.
229229
for (let row = startRow; row < rawValues.length; row++) {
230230
const r = rawValues[row];
231-
const isEmpty = r?.every((cell, index) => index <= endColumn && !cell?.effectiveValue);
231+
232+
let isEmpty = true;
233+
for (let column = startColumn; column <= endColumn; column++) {
234+
if (r?.[column]?.effectiveValue) {
235+
isEmpty = false;
236+
break;
237+
}
238+
}
232239

233240
if (!r || isEmpty) {
234241
endRow = row - 1;

0 commit comments

Comments
 (0)