mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
parent
bfab203934
commit
00eb7e325a
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ class APIRequest {
|
|||
let queryString = '';
|
||||
if (options.query) {
|
||||
// Filter out undefined query options
|
||||
const query = Object.entries(options.query).filter(([, value]) => typeof value !== 'undefined');
|
||||
const query = Object.entries(options.query).filter(([, value]) => value !== null && typeof value !== 'undefined');
|
||||
queryString = new URLSearchParams(query).toString();
|
||||
}
|
||||
this.path = `${path}${queryString && `?${queryString}`}`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue