diff --git a/lib/util.js b/lib/util.js
index <HASH>..<HASH> 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -52,7 +52,7 @@
       , host = uri.host
       , port = uri.port;
 
-    if (!'document' in global) {
+    if ('document' in global) {
       host = host || document.domain;
       port = port || (protocol == 'https'
         && document.location.protocol !== 'https:' ? 443 : document.location.port);
I did one undo to much before saving it. Fixed uniqueURI again