Skip to content

Commit ee78eeb

Browse files
committed
Add comment, replace null with undefined
1 parent 70c21b3 commit ee78eeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ function createPlugin() {
9090
const possibleThemes = await getPossibleThemes(
9191
theme,
9292
await cache.get('themes'),
93-
markdownNode.fileAbsolutePath ? path.dirname(markdownNode.fileAbsolutePath) : null,
93+
// Node could be sourced from something other than a File node
94+
markdownNode.fileAbsolutePath ? path.dirname(markdownNode.fileAbsolutePath) : undefined,
9495
markdownNode,
9596
node,
9697
languageName,

0 commit comments

Comments
 (0)