mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 19:21:54 +00:00
fix(api.ts): correct globalThis reference for location to ensure compatibility across environments
This commit is contained in:
@@ -296,8 +296,11 @@ export class ComfyApi extends EventTarget {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
this.user = ''
|
this.user = ''
|
||||||
this.api_host = location.host
|
this.api_host = gloablThis.location.host
|
||||||
this.api_base = location.pathname.split('/').slice(0, -1).join('/')
|
this.api_base = gloablThis.location.pathname
|
||||||
|
.split('/')
|
||||||
|
.slice(0, -1)
|
||||||
|
.join('/')
|
||||||
console.log('Running on', this.api_host)
|
console.log('Running on', this.api_host)
|
||||||
this.initialClientId = sessionStorage.getItem('clientId')
|
this.initialClientId = sessionStorage.getItem('clientId')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user