Browse Source

fix(core): Fix error on updateCustomer mutation

Fixes #590
Michael Bromley 5 years ago
parent
commit
bb1878f1df
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/core/src/service/services/customer.service.ts

+ 1 - 1
packages/core/src/service/services/customer.service.ts

@@ -239,7 +239,7 @@ export class CustomerService {
         input: UpdateCustomerInput | (UpdateCustomerShopInput & { id: ID }),
     ): Promise<ErrorResultUnion<UpdateCustomerResult, Customer>> {
         const hasEmailAddress = (i: any): i is UpdateCustomerInput & { emailAddress: string } =>
-            i.hasOwnProperty('emailAddress');
+            Object.hasOwnProperty.call(i, 'emailAddress');
 
         if (hasEmailAddress(input)) {
             const existingCustomerInChannel = await this.connection