Skip to content

Commit

Permalink
Filter down the list of sheets to grid-type only, fixes kevinschaich#107
Browse files Browse the repository at this point in the history
  • Loading branch information
viranch committed Mar 5, 2023
1 parent 227e425 commit 19303e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/integrations/google/googleIntegration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ export class GoogleIntegration {
return this.sheets
.get({ spreadsheetId: documentId || this.googleConfig.documentId })
.then(res => {
logInfo(`Fetched ${res.data.sheets.length} sheets.`, res.data.sheets)
return res.data.sheets
let sheets = res.data.sheets
logInfo(`Fetched ${sheets.length} sheets.`, sheets)
sheets = sheets.filter(s => s.properties.sheetType == 'GRID')
logInfo(`${sheets.length} grid-type sheets`)
return sheets
})
.catch(error => {
logError(`Error fetching sheets for spreadsheet ${this.googleConfig.documentId}.`, error)
Expand Down

0 comments on commit 19303e7

Please sign in to comment.