Skip to content

Commit

Permalink
chore: remove redundant continue
Browse files Browse the repository at this point in the history
Co-authored-by: TTtie <[email protected]>
  • Loading branch information
Snazzah and TTtie committed Sep 19, 2024
1 parent fa92a2e commit e6e313c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/errors/DiscordRESTError.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ class DiscordRESTError extends Error {
messages = messages.concat(
errors._errors.map((obj) => `${keyPrefix ? `${keyPrefix}: ` : ""}${obj.message}`)
);
continue;
}
if(errors[fieldName]._errors) {
} else if(errors[fieldName]._errors) {
messages = messages.concat(errors[fieldName]._errors.map((obj) => `${keyPrefix + fieldName}: ${obj.message}`));
} else if(Array.isArray(errors[fieldName])) {
messages = messages.concat(errors[fieldName].map((str) => `${keyPrefix + fieldName}: ${str}`));
Expand Down

0 comments on commit e6e313c

Please sign in to comment.