mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
fix(rest): don't add empty query (#7308)
This commit is contained in:
@@ -326,7 +326,10 @@ export class RequestManager extends EventEmitter {
|
|||||||
|
|
||||||
// If a query option is passed, use it
|
// If a query option is passed, use it
|
||||||
if (request.query) {
|
if (request.query) {
|
||||||
query = `?${request.query.toString()}`;
|
const resolvedQuery = request.query.toString();
|
||||||
|
if (resolvedQuery !== '') {
|
||||||
|
query = `?${resolvedQuery}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the required headers
|
// Create the required headers
|
||||||
|
|||||||
Reference in New Issue
Block a user