diff --git a/index.js b/index.js index 1406981..7f90895 100644 --- a/index.js +++ b/index.js @@ -5,5 +5,5 @@ require("./TransportHTTP.js"); // Can access via window.DwebTransports._transp require("./TransportIPFS.js"); require("./TransportYJS.js"); require("./TransportWEBTORRENT.js"); -window.DwebTransports = DwebTransports; +if (typeof window !== "undefined") { window.DwebTransports = DwebTransports; } exports = module.exports = DwebTransports;