Skip to content

Commit 04d4244

Browse files
committed
fix: check if filename exist
1 parent 471b2d2 commit 04d4244

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let pluginOptions: PluginOptions;
3535
* @returns the preprocessor markup
3636
*/
3737
const markup: MarkupPreprocessor = async ({ content, filename }) => {
38-
const isIncluded = isFileIncluded(pluginOptions.includePaths, filename);
38+
const isIncluded = filename ? isFileIncluded(pluginOptions.includePaths, filename) : false;
3939

4040
if (!isIncluded || (!pluginOptions.parseStyleTag && !pluginOptions.parseExternalStylesheet)) {
4141
return { code: content };

0 commit comments

Comments
 (0)