diff --git a/bean.js b/bean.js index cebf6d0..79a8d32 100644 --- a/bean.js +++ b/bean.js @@ -4,9 +4,9 @@ * MIT license */ (function (name, context, definition) { - if (typeof module != 'undefined' && module.exports) module.exports = definition() + if (typeof module != 'undefined' && module.exports) module.exports = definition(name,context) else if (typeof define == 'function' && define.amd) define(definition) - else context[name] = definition() + else context[name] = definition(name,context) })('bean', this, function (name, context) { name = name || 'bean' context = context || this diff --git a/src/bean.js b/src/bean.js index 2a200cf..f2b0ab2 100644 --- a/src/bean.js +++ b/src/bean.js @@ -1,7 +1,7 @@ (function (name, context, definition) { - if (typeof module != 'undefined' && module.exports) module.exports = definition() + if (typeof module != 'undefined' && module.exports) module.exports = definition(name,context) else if (typeof define == 'function' && define.amd) define(definition) - else context[name] = definition() + else context[name] = definition(name,context) })('bean', this, function (name, context) { name = name || 'bean' context = context || this