We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b9be5e0 + e4a6bd6 commit 53dc8ceCopy full SHA for 53dc8ce
1 file changed
resources/js/src/main.ts
@@ -60,6 +60,7 @@ if (window.__pan.inertiaStartListener) {
60
let impressed: Array<string> = [];
61
let hovered: Array<string> = [];
62
let clicked: Array<string> = [];
63
+ let sameNameElements: Array<string> = [];
64
65
const commit = (): void => {
66
if (queue.length === 0) {
@@ -148,6 +149,12 @@ if (window.__pan.inertiaStartListener) {
148
149
return;
150
}
151
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
+
158
if (impressed.includes(name)) {
159
160
0 commit comments