Skip to content

Commit

Permalink
fix: Fix the type error due to the upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Dec 22, 2023
1 parent 72a346c commit bc81088
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion xmcl-electron-app/main/utils/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class DownloadFullUpdateTask extends BaseTask<void> {

protected cancelTask(): Promise<void> {
this.cancellationToken.cancel()
return new Promise((resolve) => {
return new Promise<any>((resolve) => {
autoUpdater.once('update-cancelled', resolve)
})
}
Expand Down Expand Up @@ -249,6 +249,7 @@ export class ElectronUpdater implements LauncherAppUpdater {
this.logger.log(`Check update via ${autoUpdater.getFeedURL()}`)
const gfw = await this.app.registry.get(GFW)
const info = await autoUpdater.checkForUpdates()
if (!info) throw new Error('No update info found')
if (await gfw.signal && !injectedUpdate) {
injectedUpdate = true
const provider: Provider<UpdateInfo> = (await (autoUpdater as any).clientPromise)
Expand Down
2 changes: 1 addition & 1 deletion xmcl-keystone-ui/src/views/ShaderPack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
@install="onInstall"
@uninstall="onUninstall"
@enable="onEnable"
@disable="onUninstall"
@disable="onUninstall([$event])"
@category="toggleCategory"
/>
<ShaderPackDetailResource
Expand Down
2 changes: 1 addition & 1 deletion xmcl-runtime/network/pluginNetworkInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const pluginNetworkInterface: LauncherAppPlugin = (app) => {
connect,
factory(origin, opts: Agent.Options) {
let dispatcher: Dispatcher | undefined
for (const factory of apiClientFactories) { dispatcher = factory(origin, opts) }
for (const factory of apiClientFactories) { dispatcher = factory(typeof origin === 'string' ? new URL(origin) : origin, opts) }
if (!dispatcher) { dispatcher = new Pool(origin, opts) }
if (dispatcher instanceof Pool) {
const keys = Reflect.ownKeys(dispatcher)
Expand Down

0 comments on commit bc81088

Please sign in to comment.