Skip to content

Commit

Permalink
Fix #50. Use detected baseURI for Thin Syntax assetpath
Browse files Browse the repository at this point in the history
  • Loading branch information
t2ym committed Mar 2, 2017
1 parent bb50bcd commit f338da5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions define-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@
if (template) {
var domModule = document.createElement('dom-module');
var assetpath = typeof URL === 'function' && URL.name === 'URL'
? new URL((current ? current.baseURI : null) ||
(window.currentImport ? window.currentImport.baseURI : null) ||
baseURI ||
document.baseURI).pathname
? new URL(baseURI || document.baseURI).pathname
: (uri => { let a = document.createElement('a'); a.href = uri; return ('/' + a.pathname).replace(/^\/\//, '/'); })(baseURI);
domModule.appendChild(template);
domModule.setAttribute('assetpath',
Expand Down
5 changes: 1 addition & 4 deletions i18n-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@
if (template) {
let domModule = document.createElement('dom-module');
let assetpath = typeof URL === 'function' && URL.name === 'URL'
? new URL((current ? current.baseURI : null) ||
(window.currentImport ? window.currentImport.baseURI : null) ||
baseURI ||
document.baseURI).pathname
? new URL(baseURI || document.baseURI).pathname
: (uri => { let a = document.createElement('a'); a.href = uri; return ('/' + a.pathname).replace(/^\/\//, '/'); })(baseURI);
domModule.appendChild(template);
domModule.setAttribute('assetpath',
Expand Down

0 comments on commit f338da5

Please sign in to comment.