fix(toolbar-search): context can be undefined

Fixes #1189
This commit is contained in:
Eric Liu 2022-03-20 07:21:05 -07:00
commit 0da6d9ade8

View file

@ -40,7 +40,7 @@
import { tick, getContext } from "svelte";
import Search from "../Search/Search.svelte";
const { tableRows } = getContext("DataTable");
const { tableRows } = getContext("DataTable") ?? {};
$: originalRows = tableRows ? [...$tableRows] : [];
$: if (shouldFilterRows) {