fix
This commit is contained in:
+7
-2
@@ -3,6 +3,7 @@ import {
|
||||
dialog,
|
||||
BrowserWindow,
|
||||
ipcMain,
|
||||
net,
|
||||
protocol,
|
||||
screen,
|
||||
session,
|
||||
@@ -289,7 +290,11 @@ app
|
||||
diagnostics.record('settings-error')
|
||||
hostNotice = error instanceof Error ? error.message : 'Не удалось восстановить окна'
|
||||
}
|
||||
const packages = new PackageStore(join(app.getPath('userData'), 'packages'))
|
||||
const fetchNetwork: typeof fetch = (input, init) =>
|
||||
net.fetch(input instanceof URL ? input.href : input, init)
|
||||
const packages = new PackageStore(join(app.getPath('userData'), 'packages'), {
|
||||
fetch: fetchNetwork,
|
||||
})
|
||||
await packages.initialize()
|
||||
online = new Online(
|
||||
join(app.getPath('userData'), 'connection'),
|
||||
@@ -303,7 +308,7 @@ app
|
||||
encrypt: (value) => safeStorage.encryptString(value),
|
||||
decrypt: (value) => safeStorage.decryptString(value),
|
||||
},
|
||||
undefined,
|
||||
fetchNetwork,
|
||||
(failure) => diagnostics?.record('request-error', failure),
|
||||
async () => {
|
||||
const result = await dialog.showOpenDialog({
|
||||
|
||||
Reference in New Issue
Block a user