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 4c114b1106
commit f54c7144d9
2 changed files with 3 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -499,10 +499,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;