fix(core): Fix linter error (#4808)

This commit is contained in:
Michael Kret
2022-12-05 09:31:51 +02:00
committed by GitHub
parent 61e26804ba
commit 3bb3809eec
2 changed files with 2 additions and 2 deletions

View File

@@ -124,7 +124,7 @@ export class GoogleSheet {
const foundItem = response.sheets.find(
(item: { properties: { sheetId: number } }) => item.properties.sheetId === +sheetId,
);
if (!foundItem || !foundItem.properties || !foundItem.properties.title) {
if (!foundItem?.properties?.title) {
throw new Error(`Sheet with id ${sheetId} not found`);
}
return foundItem.properties.title;