Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renaming a Package method to avoid potential ambiguity with Prototype…

… extensions.
  • Loading branch information...
commit 7c211f109a385b4aab26de9bced9cd81da5f2824 1 parent 244df80
@jcoglan jcoglan authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 source/package.js
View
6 source/package.js
@@ -44,7 +44,7 @@ JS.Package = new JS.Class({
return deps;
},
- inject: function(callback, scope) {
+ injectScript: function(callback, scope) {
if (this.isLoaded(false)) return callback.call(scope || null);
var tag = document.createElement('script');
tag.type = 'text/javascript';
@@ -93,8 +93,8 @@ JS.Package = new JS.Class({
},
load: function(list, callback, scope) {
- if (list.length == 0) return callback.call(scope || null);
- list.shift().inject(function() {
+ if (list.length == 0) return callback && callback.call(scope || null);
+ list.shift().injectScript(function() {
this.load(list, callback, scope);
}, this);
},
Please sign in to comment.
Something went wrong with that request. Please try again.