Skip to content

Commit

Permalink
Fix polyfill URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashi Gowda committed Jun 26, 2018
1 parent 67b76fe commit c5b22ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions assets/webio/dist/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3068,10 +3068,11 @@ module.exports = isArray || function (val) {
var script = document.createElement('script');
script.async = true;

if ( document.getElementsByTagName("base").length === 0 ) {
script.src = '/pkg/WebIO/webio/dist/webcomponents-lite.min.js';
var webiojs_elem = document.querySelector("script[src*='webio/dist/bundle.js']")
if (!webiojs_elem) {
script.src = '/pkg/WebIO/webio/dist/webcomponents-lite.min.js'; // try our luck lol
} else {
script.src = 'pkg/WebIO/webio/dist/webcomponents-lite.min.js';
script.src = webiojs_elem.src.replace("bundle.js", "webcomponents-lite.min.js")
}

document.head.appendChild(script);
Expand Down
7 changes: 4 additions & 3 deletions assets/webio/unsafe_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
var script = document.createElement('script');
script.async = true;

if ( document.getElementsByTagName("base").length === 0 ) {
script.src = '/pkg/WebIO/webio/dist/webcomponents-lite.min.js';
var webiojs_elem = document.querySelector("script[src*='webio/dist/bundle.js']")
if (!webiojs_elem) {
script.src = '/pkg/WebIO/webio/dist/webcomponents-lite.min.js'; // try our luck lol
} else {
script.src = 'pkg/WebIO/webio/dist/webcomponents-lite.min.js';
script.src = webiojs_elem.src.replace("bundle.js", "webcomponents-lite.min.js")
}

document.head.appendChild(script);
Expand Down

0 comments on commit c5b22ab

Please sign in to comment.