Nullguard getMessageItemContents()
when checking count of reward items
This commit is contained in:
parent
130f120fda
commit
14e917823c
@ -219,8 +219,8 @@ export class DialogueHelper
|
||||
}
|
||||
|
||||
// Check reward count when item being moved isn't in reward list
|
||||
// if count is 0, it means after this move the reward array will be empty and all rewards collected
|
||||
const rewardItemCount = message.items.data.filter((x) => x._id !== itemId);
|
||||
// If count is 0, it means after this move the reward array will be empty and all rewards collected
|
||||
const rewardItemCount = message.items.data?.filter((item) => item._id !== itemId);
|
||||
if (rewardItemCount.length === 0)
|
||||
{
|
||||
message.rewardCollected = true;
|
||||
|
Loading…
Reference in New Issue
Block a user