diff --git a/boot/bootprefix.js b/boot/bootprefix.js index bff9a2aa2..ae0712d4e 100644 --- a/boot/bootprefix.js +++ b/boot/bootprefix.js @@ -20,9 +20,15 @@ $tw = $tw || Object.create(null); $tw.boot = $tw.boot || Object.create(null); // Detect platforms -$tw.browser = typeof(window) !== "undefined" ? {} : null; -$tw.node = typeof(process) === "object" ? {} : null; -$tw.nodeWebKit = $tw.node && global.window && global.window.nwDispatcher ? {} : null; +if(!("browser" in $tw)) { + $tw.browser = typeof(window) !== "undefined" ? {} : null; +} +if(!("node" in $tw)) { + $tw.node = typeof(process) === "object" ? {} : null; +} +if(!("nodeWebKit" in $tw)) { + $tw.nodeWebKit = $tw.node && global.window && global.window.nwDispatcher ? {} : null; +} // Set default boot tasks $tw.boot.tasks = {