Skip to content

Commit

Permalink
Fix some browsers reporting e.type is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Mar 17, 2013
1 parent c4ee813 commit 3f85f8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
var script = d.createElement('script');
script.src = 'js/' + scripts[i++] + '.js';
script.onload = script.onreadystatechange = function(e){
if (e.type === 'load' || /loaded|complete/.test(script.readyState)){
if (!script.readyState || /loaded|complete/.test(script.readyState)){
script.onload = script.onreadystatechange = null;
injectScript();
}
Expand Down

0 comments on commit 3f85f8b

Please sign in to comment.