mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-23 18:53:06 +00:00
Do not force from to be an array
This commit is contained in:
@@ -41,7 +41,8 @@ export class ShoreCoercingTransformer implements PathFinder<number> {
|
||||
}
|
||||
|
||||
// Search on water tiles
|
||||
const path = this.inner.findPath(waterFrom, coercedTo.water);
|
||||
const fromTiles = waterFrom.length === 1 ? waterFrom[0] : waterFrom;
|
||||
const path = this.inner.findPath(fromTiles, coercedTo.water);
|
||||
if (!path || path.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user