fix bug with listing segment where bank id doesn't exist

This commit is contained in:
omair saleh
2021-06-09 14:17:31 +08:00
parent 824eab1d92
commit 5bfed78ec0
@@ -35,8 +35,8 @@ class FetchesServiceConfigurations
return array_merge([
'active' => (int) $constant->detail->is_active ?? false,
'billable' => (int) $constant->detail->is_billable ?? false,
'bank_id' => $constant->detail->bank_id ?? '',
'bank_info' => $constant->detail->bank_id ? $this->fetchesServiceBankConfigurations->execute($constant) : '',
'bank_id' => property_exists($constant->detail, 'bank_id') ? $constant->detail->bank_id : '',
'bank_info' => property_exists($constant->detail, 'bank_id') ? $this->fetchesServiceBankConfigurations->execute($constant) : '',
'currencies' => $this->fetchesServiceCurrenciesConfigurations->execute($constant)
], $this->addConfigurations($constant)->toArray());