Skip to content
Snippets Groups Projects
Commit b195193a authored by Gabriel Engel's avatar Gabriel Engel Committed by GitHub
Browse files

Merge pull request #5082 from garychapman/bot-helpers-changes

Fixed code that checks for empty object
parents ed772fb6 f7cc3d7b
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,7 @@ class BotHelpers {
// "public" properties accessed by getters
// allUsers / onlineUsers return whichever properties are enabled by settings
get allUsers() {
if (!this.userFields.length) {
if (!Object.keys(this.userFields).length) {
this.requestError();
return false;
} else {
......@@ -84,7 +84,7 @@ class BotHelpers {
}
}
get onlineUsers() {
if (!this.userFields.length) {
if (!Object.keys(this.userFields).length) {
this.requestError();
return false;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment