glitchassassin / screeps-cartographer

Cartographer is an advanced (and open source) movement library for Screeps
29 stars 8 forks source link

bugfix: check if viable target squares list is not empty #41

Closed Alexey007gold closed 1 year ago

Alexey007gold commented 1 year ago

Fixes error

TypeError: Cannot read property 'isEqualTo' of undefined
    at move  (../node_modules/screeps-cartographer/dist/main.js:1867:23)
    at moveTo  (../node_modules/screeps-cartographer/dist/main.js:2151:8)
    at moveTo (../src/utils/movement/CartographerMovement.ts:39:11)
glitchassassin commented 1 year ago

Fixing in a slightly different way, thanks for the PR