forked from profectus/Profectus
Coerce buyable's currDisplay first
This commit is contained in:
parent
e076c84483
commit
765e2cfc5f
1 changed files with 2 additions and 1 deletions
|
@ -163,7 +163,8 @@ export function createBuyable<T extends BuyableOptions>(
|
||||||
// TODO once processComputable types correctly, remove this "as X"
|
// TODO once processComputable types correctly, remove this "as X"
|
||||||
const currDisplay = unref(display) as BuyableDisplay;
|
const currDisplay = unref(display) as BuyableDisplay;
|
||||||
if (isCoercableComponent(currDisplay)) {
|
if (isCoercableComponent(currDisplay)) {
|
||||||
return <currDisplay />;
|
const CurrDisplay = coerceComponent(currDisplay);
|
||||||
|
return <CurrDisplay />;
|
||||||
}
|
}
|
||||||
if (currDisplay != null && buyable.cost != null && buyable.resource != null) {
|
if (currDisplay != null && buyable.cost != null && buyable.resource != null) {
|
||||||
const genericBuyable = buyable as GenericBuyable;
|
const genericBuyable = buyable as GenericBuyable;
|
||||||
|
|
Loading…
Reference in a new issue