Skip to content

Loading…

CommonJS compatibility #11

Merged
merged 1 commit into from

2 participants

@Evangenieur

No description provided.

@rodneyrehm rodneyrehm merged commit 6388d02 into medialize:gh-pages
@rodneyrehm
Medialize member

merged and released with version 1.4.1
thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 19, 2012
  1. @Evangenieur

    + CommonJS module

    Evangenieur committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/URI.js
View
7 src/URI.js
@@ -1292,6 +1292,9 @@ p.equals = function(uri) {
return true;
};
-window.URI = URI;
-
+if (typeof window !== "undefined" && window !== null) {
+ window.URI = URI;
+} else if ((typeof module !== "undefined" && module !== null ? module.exports : void 0) != null) {
+ module.exports = URI;
+}
})();
Something went wrong with that request. Please try again.