fixes bug hiding trails when filter empty
This commit is contained in:
@@ -49,15 +49,16 @@
|
||||
if (storedDisplayOption) {
|
||||
selectedDisplayOption = storedDisplayOption;
|
||||
}
|
||||
if (filter && storedSort) {
|
||||
filter.sort = storedSort as typeof filter.sort;
|
||||
if (filter) {
|
||||
filter.sort =
|
||||
(storedSort as typeof filter.sort | null) ?? filter.sort;
|
||||
}
|
||||
if (filter && storedSortOrder) {
|
||||
filter.sortOrder = storedSortOrder as typeof filter.sortOrder;
|
||||
if (filter) {
|
||||
filter.sortOrder =
|
||||
(storedSortOrder as typeof filter.sortOrder | null) ??
|
||||
filter.sortOrder;
|
||||
}
|
||||
if (storedSort || storedSortOrder) {
|
||||
dispatch("update", filter);
|
||||
}
|
||||
});
|
||||
|
||||
function setDisplayOption() {
|
||||
@@ -180,7 +181,8 @@
|
||||
data-sveltekit-preload-data="off"
|
||||
>
|
||||
{#if selectedDisplayOption === "cards"}
|
||||
<TrailCard fullWidth={fullWidthCards} {trail}></TrailCard>
|
||||
<TrailCard fullWidth={fullWidthCards} {trail}
|
||||
></TrailCard>
|
||||
{:else}
|
||||
<TrailListItem {trail}></TrailListItem>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user