File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,12 @@ protected static function getFunctionName(CallExpression $node): ?string
8787 case 'Identifier ' :
8888 return $ callee ->getName ();
8989 case 'MemberExpression ' :
90- return $ callee ->getProperty ()->getName ();
90+ $ property = $ callee ->getProperty ();
91+
92+ if ($ property ->getType () === 'Identifier ' ) {
93+ return $ property ->getName ();
94+ }
95+ return null ;
9196 default :
9297 return null ;
9398 }
Original file line number Diff line number Diff line change @@ -27,4 +27,7 @@ fn9(ARG_8);
2727 /* No Related comment 4 */
2828 ) ;
2929} )
30- fn13 ( fn14 ( fn15 ( 'foo' ) ) ) ;
30+ fn13 ( fn14 ( fn15 ( 'foo' ) ) ) ;
31+
32+ // https://github.com/php-gettext/JS-Scanner/issues/3
33+ var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol [ 'for' ] && Symbol [ 'for' ] ( 'react.element' ) || 0xeac7 ;
You can’t perform that action at this time.
0 commit comments