Do not force from to be an array

This commit is contained in:
Arkadiusz Sygulski
2026-01-11 23:41:27 +01:00
parent 89242094f8
commit 77db790464
@@ -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;
}