Skip to content
Browse files

oops

  • Loading branch information...
1 parent 3354022 commit e9f114916e69de4efb759a5b2a5420d2da6d09a6 @danwrong committed May 13, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 plugins/amd.js
View
10 plugins/amd.js
@@ -69,19 +69,19 @@
factory = args.shift();
var def = new loadrunner.Definition(id, function(exports) {
- var mods = [];
+ var mods = [], thisDef = this;
function executeAMD() {
- var args = mapArgs(makeArray(dependencies), def), exported;
+ var args = mapArgs(makeArray(dependencies), thisDef), exported;
if (typeof factory == 'function') {
- exported = factory.apply(def, args);
+ exported = factory.apply(thisDef, args);
} else {
exported = factory;
}
if (typeof exported == 'undefined') {
- exported = def.exports;
+ exported = thisDef.exports;
}
exports(exported);
@@ -90,7 +90,7 @@
for (var i=0, len=dependencies.length; i < len; i++) {
var d = dependencies[i];
if (indexOf(['require', 'exports', 'module'], d) == -1) {
- mods.push(resolve(d, def));
+ mods.push(resolve(d, thisDef));
}
}

0 comments on commit e9f1149

Please sign in to comment.
Something went wrong with that request. Please try again.