File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/StimulusBundle/assets/src Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,9 @@ class StimulusLazyControllerHandler {
6464 }
6565
6666 private lazyLoadExistingControllers ( element : Element ) {
67- this . queryControllerNamesWithin ( element ) . forEach ( ( controllerName ) => this . loadLazyController ( controllerName ) ) ;
67+ Array . from ( element . querySelectorAll ( `[${ controllerAttribute } ]` ) ) . flatMap ( extractControllerNamesFrom ) . forEach (
68+ ( controllerName ) => this . loadLazyController ( controllerName )
69+ ) ;
6870 }
6971
7072 private async loadLazyController ( name : string ) {
@@ -106,10 +108,6 @@ class StimulusLazyControllerHandler {
106108 childList : true ,
107109 } ) ;
108110 }
109-
110- private queryControllerNamesWithin ( element : Element ) : string [ ] {
111- return Array . from ( element . querySelectorAll ( `[${ controllerAttribute } ]` ) ) . flatMap ( extractControllerNamesFrom ) ;
112- }
113111}
114112
115113function registerController ( name : string , controller : ControllerConstructor , application : Application ) {
You can’t perform that action at this time.
0 commit comments