Skip to content

Commit e2f47f1

Browse files
authored
Handle null position in getPositionFromMap (#2732)
1 parent 1a5f629 commit e2f47f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

repo/js/AbundantOre/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ async function run_pathing_script(name, path_state_change, current_states) {
408408
const curr_pos = (() => {
409409
try {
410410
const p = genshin.getPositionFromMap(JSON.parse(json_content).info.map_name);
411+
if (p === null) {
412+
return [null, null];
413+
}
411414
return [p.X, p.Y];
412415
} catch (e) {}
413416
return [null, null];

0 commit comments

Comments
 (0)