Skip to content

Commit

Permalink
fix(com-pwa): set localStorage shippingInfo value in undefined shippi…
Browse files Browse the repository at this point in the history
…ngInfo
  • Loading branch information
njfamirm authored and AliMD committed Mar 6, 2023
1 parent 6021c0a commit a23dcfd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uniquely/com-pwa/src/ui/page/new-order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
} from '@alwatr/element';
import {message} from '@alwatr/i18n';
import {IconBoxContent} from '@alwatr/ui-kit/src/card/icon-box.js';
import {getLocalStorageItem} from '@alwatr/util';

import {buttons, pageNewOrderStateMachine} from '../../manager/controller/new-order.js';
import {AlwatrOrderDetailBase} from '../stuff/order-detail-base.js';
Expand Down Expand Up @@ -74,7 +75,7 @@ export class AlwatrPageNewOrder extends StateMachineMixin(
protected render_state_shippingForm(): unknown {
this._logger.logMethod('render_state_shippingForm');
const order = this.stateMachine.context.order;
order.shippingInfo ??= {};
order.shippingInfo ??= getLocalStorageItem('shipping_form_data_x1', {});
return [
this.render_part_item_list(order.itemList ?? [], this.stateMachine.context.productStorage, false),
this.render_part_shipping_form(order.shippingInfo),
Expand Down

0 comments on commit a23dcfd

Please sign in to comment.