From 4561df9920e84ce48deaa4d7a6b9d315bb370c9b Mon Sep 17 00:00:00 2001
From: Daniel Hauser
Date: Sat, 2 Nov 2024 01:41:37 +0200
Subject: [PATCH] fix(sheets): loadHeaderRow
---
src/bot/storage/sheets.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/bot/storage/sheets.ts b/src/bot/storage/sheets.ts
index a08ab4a..faf13ba 100644
--- a/src/bot/storage/sheets.ts
+++ b/src/bot/storage/sheets.ts
@@ -117,6 +117,7 @@ export class GoogleSheetsStorage implements TransactionStorage {
* Load hashes from the "hash" column, assuming the first row is a header row
*/
private async loadHashes(sheet: GoogleSpreadsheetWorksheet) {
+ await sheet.loadHeaderRow();
const hashColumnNumber = sheet.headerValues.indexOf("hash");
if (hashColumnNumber === -1) {
throw new Error("Hash column not found");