Skip to content

Commit

Permalink
Fix undefined error
Browse files Browse the repository at this point in the history
  • Loading branch information
johnxu16 committed Jul 17, 2023
1 parent 13b0df6 commit 74d301d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/blocks/tableLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export const TableLayout = ({ data }) => {
const [tableClasses, setTableClasses] = useState([]);
const [mdxTableString, setMdxTableString] = useState("");

const presetNames = data.tablePresets.map((preset) =>
path.basename(preset.preset, ".json")
);
const presetNames = data.tablePresets
.filter((preset) => preset.preset)
.map((preset) => path.basename(preset.preset, ".json"));

useEffect(() => {
async function init() {
Expand Down

0 comments on commit 74d301d

Please sign in to comment.