Skip to content

Commit

Permalink
fix(core): fix bug that app calling notifiers without any logs
Browse files Browse the repository at this point in the history
  • Loading branch information
async3619 committed Dec 12, 2022
1 parent 5f310a7 commit 40bfdf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ export class App extends Loggable {
return;
}

if (newLogs.length <= 0) {
return;
}

const watcherMap = this.config.watcherMap;
for (const [, notifier] of notifiers) {
await notifier.notify(
Expand Down
4 changes: 0 additions & 4 deletions src/notifiers/discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ export class DiscordNotifier extends BaseNotifier<"Discord"> {
throw new Error("DiscordNotifier is not initialized");
}

if (pairs.length <= 0) {
return;
}

const data: DiscordWebhookData = {
content: null,
embeds: [
Expand Down

0 comments on commit 40bfdf5

Please sign in to comment.