forked from M-Labs/web2019
Fix exception on thermostat2ch and build the bundle
Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
parent
1d8d31f0a2
commit
60f8574a8c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue