Skip to content

Commit 93b6e55

Browse files
committed
fix: Undefined check for consumeHuntTarget
1 parent 4603ff3 commit 93b6e55

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/engine/entity/Npc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ export default class Npc extends PathingEntity {
894894
const hunt: HuntType = HuntType.get(this.huntMode);
895895

896896
// We need a huntTarget and a huntMode
897-
if (!this.huntTarget || hunt.type === HuntModeType.OFF) {
897+
if (!this.huntTarget || typeof hunt === 'undefined' || hunt.type === HuntModeType.OFF) {
898898
return;
899899
}
900900

0 commit comments

Comments
 (0)