We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c9ab27 commit 7383031Copy full SHA for 7383031
web-client/src/app.ts
@@ -21,6 +21,14 @@ if (!WebAssembly.instantiateStreaming) {
21
};
22
}
23
24
+function waitForDecode() {
25
+ if(typeof decode !== "undefined"){
26
+ startSession(urlData);
27
+ } else {
28
+ setTimeout(waitForDecode, 250);
29
+ }
30
+}
31
+
32
const go = new Go();
33
WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then(
34
result => {
@@ -136,7 +144,7 @@ const urlData = window.location.hash.substr(1);
136
144
console.log(urlData);
137
145
if (urlData != "") {
138
146
try {
139
- startSession(urlData);
147
+ waitForDecode();
140
148
firstInput = true;
141
149
} catch (err) {
142
150
console.log(err);
0 commit comments