From 6119c6ee7eefd90a3720e95456748c94afa70e01 Mon Sep 17 00:00:00 2001 From: Carlo Piovesan Date: Tue, 4 Oct 2022 15:28:52 +0200 Subject: [PATCH] tailscale_tun.wasm to be instantiated without streaming (MIME type) --- tun/tailscale_tun.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tun/tailscale_tun.js b/tun/tailscale_tun.js index 53b2c70..19466b3 100644 --- a/tun/tailscale_tun.js +++ b/tun/tailscale_tun.js @@ -29,7 +29,7 @@ export async function init() { const lazyRunIpn = async () => { const wasmUrl = new URL("tailscale.wasm", import.meta.url); const go = new window.Go(); - let {instance} = await WebAssembly.instantiateStreaming(fetch(wasmUrl),go.importObject); + let {instance} = await fetch(wasmUrl).then(x => x.arrayBuffer()).then(x => WebAssembly.instantiate(x,go.importObject)); go.run(instance); const sessionStateStorage = {