Handle null position in getPositionFromMap (#2732)

This commit is contained in:
Jamis
2026-01-19 14:05:51 +08:00
committed by GitHub
parent 1a5f6298fa
commit e2f47f108d

View File

@@ -408,6 +408,9 @@ async function run_pathing_script(name, path_state_change, current_states) {
const curr_pos = (() => {
try {
const p = genshin.getPositionFromMap(JSON.parse(json_content).info.map_name);
if (p === null) {
return [null, null];
}
return [p.X, p.Y];
} catch (e) {}
return [null, null];