Skip to content

Commit ffcab8b

Browse files
committed
fix: remove check for empty channel property
1 parent 1f6b085 commit ffcab8b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/Thepeer.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,7 @@ class Thepeer {
166166
*/
167167
async getBusinesses (channel) {
168168
try {
169-
let url = '/businesses'
170-
if (channel.length !== 0) {
171-
url += `?channel=${channel}`
172-
}
173-
const response = await this.request.get(url)
169+
const response = await this.request.get(`/businesses?channel=${channel}`)
174170
return response.data
175171
} catch (e) {
176172
Helper.processError(e)

0 commit comments

Comments
 (0)