Skip to content

Commit

Permalink
fix(ie): baseURI is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed May 29, 2019
1 parent e0ed00c commit ab8e304
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client/import-shims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const patchBrowser = async () => {
s.getAttribute('data-namespace') === NAMESPACE
));

const resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, doc.baseURI));
const resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, doc.location.href));
patchDynamicImport(resourcesUrl.href);

if (!window.customElements) {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/bootstrap-lazy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const bootstrapLazy = (lazyBundles: d.LazyBundlesRuntimeData, options: d.
const y = /*@__PURE__*/head.querySelector('meta[charset]');
const visibilityStyle = /*@__PURE__*/doc.createElement('style');
Object.assign(plt, options);
plt.$resourcesUrl$ = new URL(options.resourcesUrl || '/', doc.baseURI).href;
plt.$resourcesUrl$ = new URL(options.resourcesUrl || '/', doc.location.href).href;
if (options.syncQueue) {
plt.$flags$ |= PLATFORM_FLAGS.queueSync;
}
Expand Down

0 comments on commit ab8e304

Please sign in to comment.