From 18b52f0c312f75ededfc17c5641f140286cffeee Mon Sep 17 00:00:00 2001 From: bolshchikov Date: Tue, 10 Jun 2014 12:02:51 +0300 Subject: [PATCH] check amd first --- radio.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio.js b/radio.js index a6ce52c..c52c870 100644 --- a/radio.js +++ b/radio.js @@ -26,8 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE. */ (function (name, global, definition) { - if (typeof module !== 'undefined') module.exports = definition(name, global); - else if (typeof define === 'function' && typeof define.amd === 'object') define(definition); + if (typeof define === 'function' && typeof define.amd === 'object') define(definition); + else if (typeof 'exports' !== 'undefined' && typeof module !== 'undefined') module.exports = definition(name, global); else global[name] = definition(name, global); })('radio', this, function (name, global) {