Browse Source

fix(core): Fix error thrown when shipping address company is null

Fixes #744
Michael Bromley 4 years ago
parent
commit
303a2162d2
1 changed files with 1 additions and 0 deletions
  1. 1 0
      packages/core/src/api/resolvers/shop/shop-order.resolver.ts

+ 1 - 0
packages/core/src/api/resolvers/shop/shop-order.resolver.ts

@@ -332,6 +332,7 @@ export class ShopOrderResolver {
                             const address = order.shippingAddress;
                             await this.customerService.createAddress(ctx, order.customer.id, {
                                 ...address,
+                                company: address.company || '',
                                 streetLine1: address.streetLine1 || '',
                                 streetLine2: address.streetLine2 || '',
                                 countryCode: address.countryCode || '',