Skip to content

Commit

Permalink
patched to make work in nodejs environments.
Browse files Browse the repository at this point in the history
  • Loading branch information
iaincarsberg committed Mar 11, 2012
1 parent fcf7494 commit fcfe816
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions use.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright 2012, Tim Branyen (@tbranyen)
* use.js may be freely distributed under the MIT license.
*/
(function() {
(function(window) {

// Cache used to map configuration options between load and write.
var buildMap = {};
Expand Down Expand Up @@ -66,7 +66,7 @@ define({
if (typeof attach === "function") {
normalize.attach = "return " + module.attach.toString() + ";";
} else {
normalize.attach = "return window['" + module.attach + "'];";
normalize.attach = "return this['" + module.attach + "'] || exports['" + module.attach + "'];";
}

// Normalize the dependencies to have proper string characters
Expand All @@ -88,4 +88,4 @@ define({
}
});

})();
})(this);

0 comments on commit fcfe816

Please sign in to comment.