Line 153 in api.js has this
const costs = area.map(space => canvas.terrain.cost({x: space.x, y: space.y, costOptions}));
Should be this instead, misplaced the }.
const costs = area.map(space => canvas.terrain.cost({x: space.x, y: space.y}, costOptions));
Line 153 in api.js has this
const costs = area.map(space => canvas.terrain.cost({x: space.x, y: space.y, costOptions}));
Should be this instead, misplaced the }.const costs = area.map(space => canvas.terrain.cost({x: space.x, y: space.y}, costOptions));