diff --git a/boot/bootprefix.js b/boot/bootprefix.js index 0ae236c21..4dae1b28f 100644 --- a/boot/bootprefix.js +++ b/boot/bootprefix.js @@ -21,7 +21,7 @@ $tw.boot = $tw.boot || Object.create(null); // Detect platforms if(!("browser" in $tw)) { - $tw.browser = typeof(window) !== "undefined" ? {} : null; + $tw.browser = typeof(window) !== "undefined" && typeof(document) !== "undefined" ? {} : null; } if(!("node" in $tw)) { $tw.node = typeof(process) === "object" ? {} : null;