Skip to content

Commit

Permalink
Revert "fix for undefined result"
Browse files Browse the repository at this point in the history
This reverts commit 73660aa.
  • Loading branch information
TobiTenno committed Jan 15, 2018
1 parent 688c386 commit 7865419
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/settings/Database.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ class Database {
WHERE channel_id = ${channel.id} AND command_id = ${commandId}
AND is_user = true AND target_id = ${memberId}`;
const res = await this.db.query(query);
if (!res || res[0].length === 0) {
if (res[0].length === 0) {
return 'none';
}
return res.rows[0].allowed;
Expand All @@ -518,7 +518,7 @@ class Database {
WHERE channel_id = ${channel.id} AND command_id = ${commandId}
AND is_user = false AND target_id = ${role.id}`;
const res = await this.db.query(query);
if (!res || res[0].length === 0) {
if (res[0].length === 0) {
return 'none';
}
return res.rows[0].allowed === 1;
Expand Down

0 comments on commit 7865419

Please sign in to comment.