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 c2afd67 commit 2e69297Copy full SHA for 2e69297
tauri-wrapper/index.html
@@ -195,18 +195,16 @@ <h2>Existing home folders</h2>
195
window.__TAURI__.invoke('boot')
196
.catch(console.error);
197
}, 300);
198
- checkAndRedirect();
+ checkAndRedirect((nodePort.value) ? nodePort.value : "8080");
199
});
200
201
- let port = (nodePort.value) ? nodePort.value : "8080";
202
-
203
- function checkAndRedirect() {
+ function checkAndRedirect(port) {
204
fetch(`http://localhost:${port}`, { mode: 'no-cors' })
205
.then(() => {
206
window.location.href = `http://localhost:${port}`;
207
})
208
.catch(() => {
209
- setTimeout(checkAndRedirect, 1000);
+ setTimeout(() => checkAndRedirect(port), 1000);
210
211
}
212
0 commit comments