Skip to content

Commit

Permalink
Merge pull request #49 from duzun/patch-1
Browse files Browse the repository at this point in the history
Fix issue #48
  • Loading branch information
addyosmani committed Feb 16, 2015
2 parents 8873b27 + 70b80dc commit ce6c20e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions nodeAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
// that do not support module.exports or if you want to define a module
// with a circular dependency, see commonjsAdapter.js

// Help Node out by setting up define.
if (typeof module === 'object' && typeof define !== 'function') {
var define = function (factory) {
module.exports = factory(require, exports, module);
};
}
(function(define) {

define(function (require, exports, module) {
var b = require('b');

define(function (require, exports, module) {
var b = require('b');
return function () {};
});

}( // Help Node out by setting up define.
typeof module === 'object' && typeof define !== 'function'
? function (factory) { module.exports = factory(require, exports, module); }
: define
));

return function () {};
});

0 comments on commit ce6c20e

Please sign in to comment.