Skip to content

Commit 6388d02

Browse files
committed
Merge pull request #11 from Evangenieur/e6c1355928aaa4f74d0c2cbb84e0a0a8ef5c4c94
CommonJS compatibility
2 parents 994fd6c + e6c1355 commit 6388d02

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/URI.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,9 @@ p.equals = function(uri) {
12921292
return true;
12931293
};
12941294

1295-
window.URI = URI;
1296-
1295+
if (typeof window !== "undefined" && window !== null) {
1296+
window.URI = URI;
1297+
} else if ((typeof module !== "undefined" && module !== null ? module.exports : void 0) != null) {
1298+
module.exports = URI;
1299+
}
12971300
})();

0 commit comments

Comments
 (0)