refactor: use optional chaining (#6757)

This commit is contained in:
Almeida
2021-10-04 23:04:53 +01:00
committed by GitHub
parent d873a19d34
commit a194d9c37f
5 changed files with 5 additions and 5 deletions

View File

@@ -101,7 +101,7 @@ client.on('messageCreate', async message => {
{ type: 'TextChannel#fetchWebhooks', hook: await message.channel.fetchWebhooks().then(x => x.first()) },
{ type: 'Guild#fetchWebhooks', hook: await message.guild.fetchWebhooks().then(x => x.first()) },
];
if (match && match[1] === 'it') {
if (match?.[1] === 'it') {
/* eslint-disable no-await-in-loop */
for (const { type, hook } of hooks) {
for (const [i, test] of tests.entries()) {