@iyulab/router 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -190,10 +190,12 @@ function getRandomID() {
|
|
|
190
190
|
}
|
|
191
191
|
function findOutlet(element) {
|
|
192
192
|
if (element.tagName === "U-OUTLET") return element;
|
|
193
|
-
const
|
|
194
|
-
for (const
|
|
195
|
-
const
|
|
196
|
-
|
|
193
|
+
const roots = element.shadowRoot ? [element.shadowRoot, element] : [element];
|
|
194
|
+
for (const root of roots) {
|
|
195
|
+
for (const child of Array.from(root.children)) {
|
|
196
|
+
const result = findOutlet(child);
|
|
197
|
+
if (result) return result;
|
|
198
|
+
}
|
|
197
199
|
}
|
|
198
200
|
return void 0;
|
|
199
201
|
}
|