Skip to content

Commit

Permalink
Safe isSameIdentifier
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Sep 11, 2020
1 parent 8367286 commit 553f6cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -1780,6 +1780,7 @@ function isNodeLike(val) {
function isSameIdentifier(a, b) {
return (
(a.type === 'Identifier' || a.type === 'JSXIdentifier') &&
a.type === b.type &&
a.name === b.name &&
a.range[0] === b.range[0] &&
a.range[1] === b.range[1]
Expand Down

0 comments on commit 553f6cc

Please sign in to comment.