Skip to content

Commit 86c57cf

Browse files
committed
Fix the undefined this issue.
1 parent 39d37d0 commit 86c57cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pegjs from 'pegjs';
22
import loaderUtils from 'loader-utils';
33

4-
export default (source) => {
4+
export default function loader(source) {
55
if (this.cacheable) {
66
this.cacheable();
77
}
@@ -13,4 +13,4 @@ export default (source) => {
1313
const pegOptions = { output: 'source', cache: cacheParserResults };
1414

1515
return `module.exports = ${pegjs.buildParser(source, pegOptions)};`;
16-
};
16+
}

0 commit comments

Comments
 (0)