From 765e2cfc5f0c32226c41d2f429ae876c8c1438af Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Wed, 16 Mar 2022 11:24:54 -0500 Subject: [PATCH] Coerce buyable's currDisplay first --- src/features/buyable.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/buyable.tsx b/src/features/buyable.tsx index a2d58af..48d786a 100644 --- a/src/features/buyable.tsx +++ b/src/features/buyable.tsx @@ -163,7 +163,8 @@ export function createBuyable( // TODO once processComputable types correctly, remove this "as X" const currDisplay = unref(display) as BuyableDisplay; if (isCoercableComponent(currDisplay)) { - return ; + const CurrDisplay = coerceComponent(currDisplay); + return ; } if (currDisplay != null && buyable.cost != null && buyable.resource != null) { const genericBuyable = buyable as GenericBuyable;