Skip to content

Commit

Permalink
use correct fetch polyfill url
Browse files Browse the repository at this point in the history
  • Loading branch information
nuxodin committed Apr 16, 2021
1 parent 8a0d061 commit fa25226
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mod.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var urls = {
RelativeTimeFormat: [Intl],
getCanonicalLocales: [Intl],
},
'cdn.jsdelivr.net/npm/whatwg-fetch@3.6.2/fetch.js':{
'cdn.jsdelivr.net/npm/whatwg-fetch@3.6.2/dist/fetch.umd.min.js':{
'fetch':[window],
//'Headers':[window],
//'Request':[window],
Expand Down Expand Up @@ -172,6 +172,9 @@ function addGetter(obj, prop, url) {
Object.defineProperty(obj, prop, {
configurable: true,
get: function() {

//try { throw new Error(); } catch (e) { console.log(e.stack) }

delete obj[prop];
console.log(prop+' needed > loading sync, you may want to add the polyfill '+url);
loadScriptSync('https://'+url);
Expand Down

0 comments on commit fa25226

Please sign in to comment.