Fix web deployment, only use HF2 when in localhost (#2)
This commit is contained in:
parent
197f9096f8
commit
c20cfab069
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user