File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ if (window.__pan.inertiaStartListener) {
6060 let impressed : Array < string > = [ ] ;
6161 let hovered : Array < string > = [ ] ;
6262 let clicked : Array < string > = [ ] ;
63+ let sameNameElements : Array < string > = [ ] ;
6364
6465 const commit = ( ) : void => {
6566 if ( queue . length === 0 ) {
@@ -148,6 +149,12 @@ if (window.__pan.inertiaStartListener) {
148149 return ;
149150 }
150151
152+ let nameElements = document . querySelectorAll ( `[data-pan='${ name } ']` ) ;
153+ if ( nameElements . length > 1 && ! sameNameElements . includes ( name ) ) {
154+ console . warn ( `PAN: Multiple (${ nameElements . length } ) elements with the same name '${ name } ' found` ) ;
155+ sameNameElements . push ( name ) ;
156+ }
157+
151158 if ( impressed . includes ( name ) ) {
152159 return ;
153160 }
You can’t perform that action at this time.
0 commit comments