Permalink
Browse files

damn you perfectionism

  • Loading branch information...
mourner committed Oct 16, 2013
1 parent f5935dd commit b07eacf1824b86dee3c5409e33f6df77a071804a
Showing with 6 additions and 6 deletions.
  1. +6 −6 simplify.js
View
@@ -126,13 +126,13 @@ function simplify(points, tolerance, highestQuality) {
return points;
}
-// export as Node module / AMD module / browser variable
-if (typeof module !== 'undefined') {
+// export as AMD module / Node module / browser variable
+if (typeof define === 'function' && define.amd) {
+ define(function() {
+ return simplify;
+ });
+} else if (typeof module !== 'undefined') {
module.exports = simplify;
-
-} else if (typeof define === 'function' && define.amd) {
- define(function() { return simplify; });
-
} else {
window.simplify = simplify;
}

0 comments on commit b07eacf

Please sign in to comment.