Fix web deployment, only use HF2 when in localhost (#2)

This commit is contained in:
Sam El-Husseini 2017-08-05 09:54:18 -07:00 committed by Michał Moskal
parent 197f9096f8
commit c20cfab069

View File

@ -28,7 +28,8 @@ namespace pxt.editor {
let initPromise: Promise<Ev3Wrapper>
function initAsync() {
if (!initPromise)
const forceHexDownload = /forceHexDownload/i.test(window.location.href);
if (!initPromise && Cloud.isLocalHost() && Cloud.localToken && !forceHexDownload)
initPromise = hf2Async()
.catch(err => {
initPromise = null