Fix nullish types
This commit is contained in:
parent
fafa0472d7
commit
d21e25f72d
|
@ -91,7 +91,7 @@ export const initialise = (context: StoreContext) => {
|
|||
}
|
||||
|
||||
// Wipe state
|
||||
filter.set(get(initialFilter))
|
||||
filter.set(get(initialFilter) ?? undefined)
|
||||
inlineFilters.set([])
|
||||
sort.set({
|
||||
column: get(initialSortColumn),
|
||||
|
|
|
@ -108,7 +108,7 @@ export const initialise = (context: StoreContext) => {
|
|||
}
|
||||
|
||||
// Wipe state
|
||||
filter.set(get(initialFilter))
|
||||
filter.set(get(initialFilter) ?? undefined)
|
||||
inlineFilters.set([])
|
||||
sort.set({
|
||||
column: get(initialSortColumn),
|
||||
|
|
|
@ -121,7 +121,7 @@ export const initialise = (context: StoreContext) => {
|
|||
}
|
||||
|
||||
// Reset state for new view
|
||||
filter.set(get(initialFilter))
|
||||
filter.set(get(initialFilter) ?? undefined)
|
||||
inlineFilters.set([])
|
||||
sort.set({
|
||||
column: get(initialSortColumn),
|
||||
|
|
|
@ -120,5 +120,7 @@ export const initialise = (context: StoreContext) => {
|
|||
const { filter, initialFilter } = context
|
||||
|
||||
// Reset filter when initial filter prop changes
|
||||
initialFilter.subscribe(filter.set)
|
||||
initialFilter.subscribe($initialFilter =>
|
||||
filter.set($initialFilter ?? undefined)
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue