Skip to content

Commit c994911

Browse files
fix: check for undefined as well as null for adding messages
1 parent da56889 commit c994911

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interactions/commands/message/addMessage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default async function handleAddMessageCommand(
8888
let embedQuery:
8989
| Prisma.MessageEmbedCreateNestedOneWithoutMessageInput
9090
| undefined = undefined;
91-
if (embed !== null) {
91+
if (embed !== null && embed !== undefined) {
9292
let fieldQuery:
9393
| Prisma.EmbedFieldCreateNestedManyWithoutEmbedInput
9494
| undefined;

0 commit comments

Comments
 (0)