1
0
Fork 0

Fix exception on thermostat2ch and build the bundle

Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2024-07-16 11:36:13 +08:00
parent 2dd5d2db1a
commit e7f187c6c7
1 changed files with 2 additions and 1 deletions

View File

@ -500,10 +500,11 @@ const useCart = ((set, get) => ({
fillExtData: (crate_id) => set(state => ({ fillExtData: (crate_id) => set(state => ({
crates: state.crates.map((crate, _i) => { crates: state.crates.map((crate, _i) => {
if (crate_id === crate.id) { if (crate_id === crate.id) {
const options_name = state.crateParams(crate.crate_mode).options;
let itemsCopy = Array.from(crate.items); let itemsCopy = Array.from(crate.items);
itemsCopy = itemsCopy.map((item, index) => { itemsCopy = itemsCopy.map((item, index) => {
if (!item.options) return item; if (!item[options_name]) return item;
if (!item.options_data) item.options_data = {}; if (!item.options_data) item.options_data = {};
item.options_data.ext_data = FillExtCardData(itemsCopy, index); item.options_data.ext_data = FillExtCardData(itemsCopy, index);
return item; return item;