fix(toolbar-search): context can be undefined (#1190)

Fixes #1189
This commit is contained in:
metonym 2022-03-20 07:26:27 -07:00 committed by GitHub
commit 254bd848b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) {