mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: Refresh error
This commit is contained in:
@@ -38,9 +38,19 @@ const loadXpackStatic = () => {
|
||||
return Promise.resolve()
|
||||
}
|
||||
const url = '/xpack_static/license-generator.umd.js'
|
||||
return request.loadRemoteScript(url, 'sqlbot_xpack_static', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
LicenseGenerator?.init(import.meta.env.VITE_API_BASE_URL)
|
||||
return new Promise((resolve, reject) => {
|
||||
request
|
||||
.loadRemoteScript(url, 'sqlbot_xpack_static', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
LicenseGenerator?.init(import.meta.env.VITE_API_BASE_URL).then(() => {
|
||||
resolve(true)
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Failed to load xpack_static script:', error)
|
||||
ElMessage.error('Failed to load license generator script')
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user