diff --git a/vendor/magento/module-company/Block/Adminhtml/Customer/Edit/Tab/View/PersonalInfo.php b/vendor/magento/module-company/Block/Adminhtml/Customer/Edit/Tab/View/PersonalInfo.php index fe6ac9a1886e..3236510caf67 100644 --- a/vendor/magento/module-company/Block/Adminhtml/Customer/Edit/Tab/View/PersonalInfo.php +++ b/vendor/magento/module-company/Block/Adminhtml/Customer/Edit/Tab/View/PersonalInfo.php @@ -103,8 +103,8 @@ public function getJobTitle() public function getCustomerType() { $customerType = CompanyCustomerInterface::TYPE_INDIVIDUAL_USER; - if ($this->getCustomerAttributes() && $this->getCustomerAttributes()->getCompanyId()) { - $company = $this->getCompany(); + $company = $this->getCompany(); + if ($company !== null) { $customer = $this->_backendSession->getCustomerData()['account']; $customerType = ($company->getSuperUserId() == $customer['id']) ? CompanyCustomerInterface::TYPE_COMPANY_ADMIN