Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Killing try/catch around callback
Browse files Browse the repository at this point in the history
  • Loading branch information
tkadlec committed Sep 22, 2014
1 parent 17824a7 commit 6e82a9c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions loadJS.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ function loadJS( src, cb ){
script.src = src;
ref.parentNode.insertBefore( script, ref );
if (cb) {
script.onload = function(){
try {
cb();
}
catch (e) {}
};
script.onload = cb;
}
return script;
}

0 comments on commit 6e82a9c

Please sign in to comment.