@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.
Files changed (2) hide show
  1. package/dist/index.js +6 -4
  2. 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 root = element.shadowRoot ?? element;
194
- for (const child of Array.from(root.children)) {
195
- const result = findOutlet(child);
196
- if (result) return result;
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iyulab/router",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "A modern client-side router for web applications with support for Lit and React components",
5
5
  "keywords": [
6
6
  "lit",