Correct option useage

This commit is contained in:
WBHarry 2026-02-26 02:09:31 +01:00 committed by GitHub
parent 3146dc2e63
commit 68081bd7e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -58,7 +58,7 @@ export default class DhRegionLayer extends foundry.canvas.layers.RegionLayer {
return x.between(t.x, t.x + t.width * gridSize) && y.between(t.y, t.y + t.height * gridSize); return x.between(t.x, t.x + t.width * gridSize) && y.between(t.y, t.y + t.height * gridSize);
}); });
if (inBounds.length !== 1) return options.basePreConfirm?.() ?? true; if (inBounds.length !== 1) return options.preConfirm?.() ?? true;
const shapeData = shape.toObject(); const shapeData = shape.toObject();
const token = inBounds[0]; const token = inBounds[0];
@ -78,7 +78,7 @@ export default class DhRegionLayer extends foundry.canvas.layers.RegionLayer {
}); });
} }
return options?.basePreConfirm?.() ?? true; return options?.preConfirm?.() ?? true;
}; };
super.placeRegion(data, { ...options, preConfirm }); super.placeRegion(data, { ...options, preConfirm });