Skip to content

Commit 367b696

Browse files
committed
Require options
1 parent eb34a89 commit 367b696

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/rules/module-vars.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ module.exports = {
3535
create: function(context) {
3636
return {
3737
'CallExpression[callee.name=define]': function(node) {
38-
const config = context.options[0] || {};
38+
if (!context.options[0]) return;
39+
40+
const config = context.options[0];
3941
const modules = moduleUtil.getModules(node);
4042

4143
if (modules.varCount === 0) return;

0 commit comments

Comments
 (0)