summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilson Page <wilsonpage@me.com>2013-10-07 07:11:46 -0700
committerWilson Page <wilsonpage@me.com>2013-10-07 07:11:46 -0700
commit848806b802b288d9751899f86e499a62d0f7ba13 (patch)
tree8f92de0d50d9b249cfac455d2df8127cafc70cea
parentc4a6230f5f60241d45477912d059ff09c51af04a (diff)
parent843bec8065a1e8ea10953cc560b64748356c7b96 (diff)
downloadfastdom-848806b802b288d9751899f86e499a62d0f7ba13.zip
fastdom-848806b802b288d9751899f86e499a62d0f7ba13.tar.gz
fastdom-848806b802b288d9751899f86e499a62d0f7ba13.tar.bz2
Merge pull request #24 from georgecrawford/master
Use more standard test to expose CommonJS module
-rw-r--r--index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.js b/index.js
index c76a682..6be22f8 100644
--- a/index.js
+++ b/index.js
@@ -278,7 +278,7 @@
* Expose 'fastdom'
*/
- if (typeof exports === "object") {
+ if (typeof module !== 'undefined' && module.exports) {
module.exports = fastdom;
} else if (typeof define === "function" && define.amd) {
define(function(){ return fastdom; });
@@ -286,4 +286,4 @@
window['fastdom'] = fastdom;
}
-})(window.fastdom); \ No newline at end of file
+})(window.fastdom);