Skip to content

Commit

Permalink
Don't do namespace.get() twice
Browse files Browse the repository at this point in the history
  • Loading branch information
wKich committed Aug 16, 2016
1 parent 69a1dec commit 8171db3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rules/namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,12 @@ exports.create = function namespaceRule(context) {
break
}

if (namespace.get(dereference.property.name) == null) return
const exported = namespace.get(dereference.property.name)
if (exported == null) return

// stash and pop
namepath.push(dereference.property.name)
namespace = namespace.get(dereference.property.name).namespace
namespace = exported.namespace
dereference = dereference.parent
}

Expand Down

0 comments on commit 8171db3

Please sign in to comment.