Skip to content

Commit

Permalink
hotfix: safe null check for listPath
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmason committed Oct 19, 2024
1 parent 6e8c59a commit 8becc24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/AddItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function AddItem({ listPath, data }) {
duplicate: 'Item already exists!',
};

const extractedListName = listPath.match(/(?<=\/).*$/)[0];
const extractedListName = listPath?.match(/(?<=\/).*$/)[0];

const normalizeString = (str) =>
str.toLowerCase().replace(/[^a-z0-9-]+/g, '');
Expand Down

0 comments on commit 8becc24

Please sign in to comment.