Permalink
Browse files

Renaming a Package method to avoid potential ambiguity with Prototype…

… extensions.
  • Loading branch information...
1 parent 244df80 commit 7c211f109a385b4aab26de9bced9cd81da5f2824 @jcoglan jcoglan committed Aug 4, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 source/package.js
View
@@ -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);
},

0 comments on commit 7c211f1

Please sign in to comment.