Skip to content
This repository was archived by the owner on Jan 3, 2019. It is now read-only.

Commit 1df3868

Browse files
committed
fix: "TypeError: Path must be a string. Received undefined" in Node v6
Apparently `filename` is a required parameter to `this.exec()` in a loader. It worked before because of some lax Node code which is now stricter.
1 parent 3668f94 commit 1df3868

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var MessageFormat = require('messageformat');
44
module.exports = function(content) {
55
var query = loaderUtils.parseQuery(this.query);
66
var locale = query.locale || 'en';
7-
var messages = (Array.isArray(this.inputValue) && typeof this.inputValue[0] === 'object') ? this.inputValue[0] : this.exec(content);
7+
var messages = (Array.isArray(this.inputValue) && typeof this.inputValue[0] === 'object') ? this.inputValue[0] : this.exec(content, this.resource);
88
var messageFormat = new MessageFormat(locale);
99
if (query.disablePluralKeyChecks) {
1010
messageFormat.disablePluralKeyChecks();

0 commit comments

Comments
 (0)