mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-15 03:23:22 +08:00
Handle null position in getPositionFromMap (#2732)
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user