Skip to content

Commit

Permalink
🐛 Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter committed Jul 23, 2022
1 parent 6e3d773 commit e944cd7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/Upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,8 @@ export default function Upload() {
data.messages.topDMs = channels
.filter(
(channel) =>
channel.isDM && channel.name.includes("Direct Message with")
channel?.isDM &&
channel?.name?.includes("Direct Message with")
)
.sort((a, b) => b.messages.length - a.messages.length)

Expand Down Expand Up @@ -688,7 +689,8 @@ export default function Upload() {
const oldestInDMs = channels
.filter(
(channel) =>
channel.isDM && channel.name.includes("Direct Message with")
channel?.isDM &&
channel?.name?.includes("Direct Message with")
)

.map((channel) => {
Expand Down Expand Up @@ -985,7 +987,7 @@ export default function Upload() {
});
})
.catch((err) => {
console.log(err)
console.log(err);
if (err.message === "invalid_package_missing_messages") {
setLoading(null);
setError(
Expand Down

1 comment on commit e944cd7

@vercel
Copy link

@vercel vercel bot commented on e944cd7 Jul 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.