Skip to content

Commit c723787

Browse files
committed
fix: root factory variable Module
1 parent 0af9c93 commit c723787

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,15 +774,15 @@
774774
if (!prefix) {
775775
for (let attr of element.attributes) {
776776
// If an attribute with "-query" suffix is found, extract prefix.
777-
if (attr.name.endsWith("-query")) {
777+
if (attr.name.endsWith("-query") || attr.name.endsWith(".query")) {
778778
prefix = attr.name.slice(0, -6);
779779
}
780780
}
781781
// If no valid prefix is found, exit the function.
782782
if (!prefix) return [];
783783
}
784784
// Get the selector using the derived prefix.
785-
selector = element.getAttribute(prefix + "-" + "query");
785+
selector = element.getAttribute(prefix + "-" + "query") || element.getAttribute(prefix + "." + "query");
786786
if (!selector) return []; // Exit if no selector is found.
787787
}
788788

0 commit comments

Comments
 (0)