Skip to content

Commit

Permalink
Fix for IE10 not loading scripts (#5404)
Browse files Browse the repository at this point in the history
* Fix for IE10 not loading scripts

* Fixed duplicate declaration.
  • Loading branch information
fredrik-sogaard authored and m-allanson committed May 14, 2018
1 parent ae75f8f commit cc5dac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby/cache-dir/static-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ module.exports = (locals, callback) => {
<script
key={`script-loader`}
dangerouslySetInnerHTML={{
__html: `/*<![CDATA[*/!function(e,t,r){function n(){for(;d[0]&&"loaded"==d[0][f];)c=d.shift(),c[o]=!i.parentNode.insertBefore(c,i)}for(var s,a,c,d=[],i=e.scripts[0],o="onreadystatechange",f="readyState";s=r.shift();)a=e.createElement(t),"async"in i?(a.async=!1,e.head.appendChild(a)):i[f]?(d.push(a),a[o]=n):e.write("<"+t+' src="'+s+'" defer></'+t+">"),a.src=s}(document,"script",[${scriptsString}])/*]]>*/`,
__html: `/*<![CDATA[*/[${scriptsString}].forEach(function(s){document.write('<script src="'+s+'" defer></'+'script>')})/*]]>*/`,
}}
/>
)
Expand Down

0 comments on commit cc5dac3

Please sign in to comment.