Skip to content

Commit

Permalink
clone array in purgeMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Jul 31, 2024
1 parent 88c8ad4 commit a4567f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routes/Channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ export default class Channels {
limit: options.limit,
[chosenOption]: options[chosenOption]
});
for (const message of messages) {
for (const message of Array.from(messages)) {
const f = filter(message);
if (f === false) {
messages.splice(messages.indexOf(message), 1);
Expand Down

0 comments on commit a4567f3

Please sign in to comment.