From 175e625cc6dcec80bcd139ff28857a5b26c6e55e Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Tue, 16 Jul 2024 11:36:13 +0800 Subject: [PATCH] Fix exception on thermostat2ch and build the bundle Signed-off-by: Egor Savkin --- static/js/shop/shop_store.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/shop/shop_store.js b/static/js/shop/shop_store.js index 78e189b..3bddac2 100644 --- a/static/js/shop/shop_store.js +++ b/static/js/shop/shop_store.js @@ -500,10 +500,11 @@ const useCart = ((set, get) => ({ fillExtData: (crate_id) => set(state => ({ crates: state.crates.map((crate, _i) => { if (crate_id === crate.id) { + const options_name = state.crateParams(crate.crate_mode).options; let itemsCopy = Array.from(crate.items); itemsCopy = itemsCopy.map((item, index) => { - if (!item.options) return item; + if (!item[options_name]) return item; if (!item.options_data) item.options_data = {}; item.options_data.ext_data = FillExtCardData(itemsCopy, index); return item;