fix: 🐛 Controlla se la colonna è una stringa o un oggetto

This commit is contained in:
Maicol Battistini 2021-09-30 16:33:53 +02:00
parent f4d904cc1f
commit ef6479f34f
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ export default class RecordsPage extends Page {
return collect(this.columns)
.map(
(column: ColumnT | string, id: string) => (
<TableHeadCell id={id} key={id} {...(column ?? {})}>
<TableHeadCell id={id} key={id} {...((typeof column === 'object') ? column : {})}>
{typeof column === 'string' ? column : column.title}
</TableHeadCell>
)