Skip to content

Commit

Permalink
preserver query params when loading modules
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Apr 10, 2024
1 parent 8c2d728 commit ff3beb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wcc.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ async function initializeCustomElement(elementURL, tagName, attrs = [], definiti
}

// https://github.com/ProjectEvergreen/wcc/pull/67/files#r902061804
const { pathname } = elementURL;
const element = customElements.get(tagName) ?? (await import(pathname)).default;
const dataLoader = (await import(pathname)).getData;
const { href } = elementURL;
const element = customElements.get(tagName) ?? (await import(href)).default;
const dataLoader = (await import(href)).getData;
const data = props
? props
: dataLoader
Expand Down

0 comments on commit ff3beb8

Please sign in to comment.