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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -177,7 +177,7 @@ export class AwsSnsTrigger implements INodeType {
data,
'ListSubscriptionsByTopicResponse.ListSubscriptionsByTopicResult.Subscriptions',
);
if (!subscriptions || !subscriptions.member) {
if (!subscriptions?.member) {
return false;
}

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;