Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
fix: undefined value in nuxt/no-env-in-context
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo committed Dec 10, 2018
1 parent 976f28d commit b9fed00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/no-env-in-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = {
...utils.executeOnVue(context, obj => {
for (const funcName of HOOKS) {
const func = utils.getFunctionWithName(obj, funcName)
const param = func.value.params && func.value.params[0]
const param = func && func.value ? func.value.params && func.value.params[0] : false
if (param) {
if (param.type === 'ObjectPattern') {
for (const prop of param.properties) {
Expand Down

0 comments on commit b9fed00

Please sign in to comment.