Skip to content

Commit

Permalink
fix bugs introduced by PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
theoephraim committed Aug 31, 2024
1 parent d0bb05b commit 3fe15c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/GoogleSpreadsheetWorksheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ export class GoogleSpreadsheetWorksheet {
async loadHeaderRow(headerRowIndex?: number) {
if (headerRowIndex !== undefined) this._headerRowIndex = headerRowIndex;
const rows = await this.getCellsInRange(this._headerRange);
await this._processHeaderRow(rows);
this._processHeaderRow(rows);
}

private async _processHeaderRow(rows: any[]) {
private _processHeaderRow(rows: any[]) {
if (!rows) {
throw new Error('No values in the header row - fill the first row with header values before trying to interact with rows');
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/manage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ describe('Managing doc info and sheets', () => {
let sheet: GoogleSpreadsheetWorksheet;

beforeAll(async () => {
sheet = await doc.addSheet({ title: 'validation rules test' });
sheet = await doc.addSheet({ title: `validation rules test ${+new Date()}` });
});
afterAll(async () => {
await sheet.delete();
Expand Down

0 comments on commit 3fe15c1

Please sign in to comment.