Skip to content

Commit e54af60

Browse files
committed
Lint error fixes
1 parent e99089e commit e54af60

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ui/src/main.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,30 +221,30 @@ fetch('_setup')
221221
* fetch '_setup' as that is a short json file
222222
* use redirect: 'manual' to stop any redirection to a login page in case it causes a CORS error
223223
*/
224-
fetch("_setup", { redirect: 'manual', cache: 'no-cache' })
224+
fetch('_setup', { redirect: 'manual', cache: 'no-cache' })
225225
.then(function (res) {
226-
const contentType = res.headers?.get("content-type")
226+
const contentType = res.headers?.get('content-type')
227227
/** If the content type is not application/json then likely it is a login request,
228228
* or a failed redirection to login page, either of which would cause the websocket
229229
* connect to fail, so reload the page in order to show the login request.
230230
* Allow it continue the first few times though, allowing the socket connect code to fail
231231
* and retry, in case this is just a transient issue
232232
*/
233-
if((contentType && contentType.includes("application/json")) || retryCount < 3) {
233+
if ((contentType && contentType.includes('application/json')) || retryCount < 3) {
234234
tryConnect(interval)
235235
} else {
236236
forcePageReload('Websocket pre-fetch failed')
237237
}
238238
})
239-
.catch(function (err) {
239+
.catch(function () {
240240
// there is some sort of network failure, let the websocket connection code handle that
241241
tryConnect(interval)
242242
})
243243
}
244244
}
245245

246246
// default interval - every 2.5 seconds
247-
function tryConnect(interval) {
247+
function tryConnect (interval) {
248248
socket.connect()
249249
if (retryCount >= 14) {
250250
// trying for over 1 minute

0 commit comments

Comments
 (0)