Wishlist: Fix TypeError on initial wishlist creation
On creation Characters are not included. Since a new wishlist is empty anyway, we attach an empty array manually.
This commit is contained in:
@@ -43,9 +43,10 @@ module.exports = {
|
|||||||
if(!wishlist) {
|
if(!wishlist) {
|
||||||
wishlist = await Wishlist.create({
|
wishlist = await Wishlist.create({
|
||||||
ping: false,
|
ping: false,
|
||||||
UserId: user.id
|
UserId: user.id,
|
||||||
});
|
});
|
||||||
interaction.channel.send("Created new wishlist");
|
wishlist.Characters = []
|
||||||
|
await interaction.channel.send("Created new wishlist");
|
||||||
}
|
}
|
||||||
switch (interaction.options.getSubcommand()) {
|
switch (interaction.options.getSubcommand()) {
|
||||||
case "view":
|
case "view":
|
||||||
|
|||||||
Reference in New Issue
Block a user