Skip to content

Commit

Permalink
Null check rootNode before calling getScope
Browse files Browse the repository at this point in the history
  • Loading branch information
crnhrv committed May 30, 2024
1 parent 417e1ca commit 4a2ea55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/util/propTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ module.exports = function propTypesInstructions(context, components, utils) {
*/
function resolveValueForIdentifierNode(node, rootNode, callback) {
if (
node
rootNode
&& node
&& node.type === 'Identifier'
) {
const scope = getScope(context, rootNode);
Expand Down

0 comments on commit 4a2ea55

Please sign in to comment.