Skip to content

Commit ac6a15f

Browse files
committed
Fix Bsaber domain being undefined for first-time requests
1 parent 501b39e commit ac6a15f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/api/BackendRequestHandler.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ export class BackendRequestHandler implements RequestHandler {
2020
this.get = this.get.bind(this)
2121
this.post = this.post.bind(this)
2222

23+
this.domain = domain
24+
this.baseUrl = `https://${this.domain}`
25+
2326
const cookies = Spicetify.LocalStorage.get("beatsaber:cookies")
2427
if (!cookies) {
2528
this.cookieJar = new CookieJar()
2629
return
2730
}
2831
this.cookieJar = CookieJar.fromJSON(cookies)
29-
this.domain = domain
30-
this.baseUrl = `https://${this.domain}`
3132
}
3233

3334
get proxyUrl(): string {

0 commit comments

Comments
 (0)