Skip to content

Commit

Permalink
chore: add undefined check
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Feb 26, 2022
1 parent b70c21e commit 043bb84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/preprocessReadme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function preprocessReadme(opts: Partial<PreprocessReadmeOptions>): Pick<P
return {
// @ts-ignore
markup: ({ content, filename }) => {
if (/node_modules/.test(filename) || !filename.endsWith(".md")) return null;
if (filename && (/node_modules/.test(filename) || !filename.endsWith(".md"))) return null;

if (opts.repoUrl) {
content = content.replace("<!-- REPO_URL -->", `[GitHub repo](${opts.repoUrl})`);
Expand Down

0 comments on commit 043bb84

Please sign in to comment.