Skip to content

Commit 4a2ea55

Browse files
committed
Null check rootNode before calling getScope
1 parent 417e1ca commit 4a2ea55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/util/propTypes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,8 @@ module.exports = function propTypesInstructions(context, components, utils) {
372372
*/
373373
function resolveValueForIdentifierNode(node, rootNode, callback) {
374374
if (
375-
node
375+
rootNode
376+
&& node
376377
&& node.type === 'Identifier'
377378
) {
378379
const scope = getScope(context, rootNode);

0 commit comments

Comments
 (0)