Fix resetting sort column when sort column doesn't exist in schema whenever schema is yet to be loaded

This commit is contained in:
Andrew Kingston 2023-08-21 17:49:54 +01:00
parent 10cbf4f08a
commit c7d1010ce3
1 changed files with 2 additions and 2 deletions

View File

@ -31,10 +31,10 @@ export const initialise = context => {
const sortColumnExists = derived( const sortColumnExists = derived(
[sort, definition], [sort, definition],
([$sort, $definition]) => { ([$sort, $definition]) => {
if (!$sort?.column) { if (!$sort?.column || !$definition) {
return true return true
} }
return $definition?.schema?.[$sort.column] != null return $definition.schema?.[$sort.column] != null
} }
) )