summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeverin Klaus <betabong@gmail.com>2017-04-04 23:21:00 +0200
committerWilson Page <wilsonpage@me.com>2017-04-04 15:21:00 -0600
commitbc0f8b1a5ee4a0a5e1240fbd57577296579dcff8 (patch)
treeb05291cf74b19db1e36956dad4e6f48898da6b7e
parent99beda37e8c6f7932e8c1bb79572fca7f1852161 (diff)
downloadfastdom-bc0f8b1a5ee4a0a5e1240fbd57577296579dcff8.zip
fastdom-bc0f8b1a5ee4a0a5e1240fbd57577296579dcff8.tar.gz
fastdom-bc0f8b1a5ee4a0a5e1240fbd57577296579dcff8.tar.bz2
Use "more standard" AMD/CJS detect syntax (#101)
This will allow tools like AMDClean https://github.com/gfranko/amdclean to recognise the expression.
-rw-r--r--fastdom.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/fastdom.js b/fastdom.js
index 0fe2751..e4c9c36 100644
--- a/fastdom.js
+++ b/fastdom.js
@@ -236,7 +236,7 @@ function mixin(target, source) {
var exports = win.fastdom = (win.fastdom || new FastDom()); // jshint ignore:line
// Expose to CJS & AMD
-if ((typeof define)[0] == 'f') define(function() { return exports; });
-else if ((typeof module)[0] == 'o') module.exports = exports;
+if ((typeof define) == 'function') define(function() { return exports; });
+else if ((typeof module) == 'object') module.exports = exports;
})( typeof window !== 'undefined' ? window : this);