Skip to content

Commit

Permalink
fix: map doesn't exist on set keys in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
tschoffelen committed Sep 7, 2024
1 parent 9a5332b commit b3e8555
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export function DataTableFilter<TData, TValue>({
const selectedValues = new Set(column?.getFilterValue() as string[]);

options = Array.from(
options || facets?.keys?.().map((value) => ({ value, label: value })) || [],
options ||
Array.from(facets?.keys() || []).map((value) => ({
value,
label: value,
})),
);

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard/src/routes/functions/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const columns: ColumnDef<FunctionItem>[] = [
}
}

return tags?.keys?.()?.map((tag) => ({ value: tag, label: tag }));
return Array.from(tags.keys()).map((tag) => ({ value: tag, label: tag }));
},
filterFn: (row, id, value) => {
return value.every((v) => row.getValue(id)?.includes(v));
Expand Down

0 comments on commit b3e8555

Please sign in to comment.