Skip to content

Commit

Permalink
Cleaned up a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Oceanity committed Sep 14, 2024
1 parent 0318f82 commit 3c82d4d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/backend/restrictions/builtin/channel-game.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,9 @@ const model = {
if (passed) {
resolve();
} else {
const {
name: expectedGameName
} = (await TwitchApi.categories.getCategoryById(expectedGameId)) ?? {};
const expectedGame = await TwitchApi.categories.getCategoryById(expectedGameId);
reject(
`Channel category/game isn't set to ${expectedGameName ?? "the correct category/game"}.`
`Channel category/game isn't set to ${expectedGame?.name ?? "the correct category/game"}.`
);
}
});
Expand Down

0 comments on commit 3c82d4d

Please sign in to comment.