Skip to content

Commit 61598b1

Browse files
author
Michael Vurchio
committed
Check if property exist before using it
1 parent f2cc577 commit 61598b1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ const markup = async ({ content, filename }) => {
7777

7878
const style = async ({ content, filename }) => {
7979
let code = content;
80+
81+
if (!moduleClasses.hasOwnProperty(filename)) {
82+
return { code };
83+
}
84+
8085
const classes = moduleClasses[filename];
8186

8287
if (Object.keys(classes).length === 0) {

0 commit comments

Comments
 (0)