File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -855,7 +855,7 @@ function componentRule(rule, context) {
855855 } ,
856856
857857 FunctionExpression ( node ) {
858- if ( node . async ) {
858+ if ( node . async && node . generator ) {
859859 components . add ( node , 0 ) ;
860860 return ;
861861 }
@@ -868,7 +868,7 @@ function componentRule(rule, context) {
868868 } ,
869869
870870 FunctionDeclaration ( node ) {
871- if ( node . async ) {
871+ if ( node . async && node . generator ) {
872872 components . add ( node , 0 ) ;
873873 return ;
874874 }
@@ -881,11 +881,6 @@ function componentRule(rule, context) {
881881 } ,
882882
883883 ArrowFunctionExpression ( node ) {
884- if ( node . async ) {
885- components . add ( node , 0 ) ;
886- return ;
887- }
888-
889884 const component = utils . getStatelessComponent ( node ) ;
890885 if ( ! component ) {
891886 return ;
You can’t perform that action at this time.
0 commit comments