@@ -10,6 +10,7 @@ const values = require('object.values');
1010
1111const  Components  =  require ( '../util/Components' ) ; 
1212const  propsUtil  =  require ( '../util/props' ) ; 
13+ const  astUtil  =  require ( '../util/ast' ) ; 
1314const  docsUrl  =  require ( '../util/docsUrl' ) ; 
1415const  propWrapperUtil  =  require ( '../util/propWrapper' ) ; 
1516const  report  =  require ( '../util/report' ) ; 
@@ -26,7 +27,7 @@ const getText = eslintUtil.getText;
2627function  nestedPropTypes ( prop )  { 
2728  return  ( 
2829    prop . type  ===  'Property' 
29-          &&  prop . value . type   ===   'CallExpression' 
30+     &&  astUtil . isCallExpression ( prop . value ) 
3031  ) ; 
3132} 
3233
@@ -311,7 +312,7 @@ module.exports = {
311312        } 
312313        if  ( 
313314          node . value 
314-           &&  node . value . type   ===   'CallExpression' 
315+           &&  astUtil . isCallExpression ( node . value ) 
315316          &&  propWrapperUtil . isPropWrapperFunction ( 
316317            context , 
317318            getText ( context ,  node . value . callee ) 
@@ -337,7 +338,7 @@ module.exports = {
337338        } 
338339        const  right  =  node . parent . right ; 
339340        if  ( 
340-           right . type   ===   'CallExpression' 
341+           astUtil . isCallExpression ( right ) 
341342          &&  propWrapperUtil . isPropWrapperFunction ( 
342343            context , 
343344            getText ( context ,  right . callee ) 
0 commit comments