Skip to content

Commit

Permalink
refactor: Rename vars to more readability
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Oct 4, 2024
1 parent d9c8d1c commit ed9493e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/main/src/mainWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ export async function restoreOrCreateWindow() {
window.webContents.session.on('will-download', (_, item) => {

Check failure on line 90 in packages/main/src/mainWindow.ts

View workflow job for this annotation

GitHub Actions / tests / tests (windows-latest)

tests/unit.spec.ts > Should create a new window

TypeError: Cannot read properties of undefined (reading 'session') ❯ Module.restoreOrCreateWindow src/mainWindow.ts:90:22 ❯ tests/unit.spec.ts:58:3

Check failure on line 90 in packages/main/src/mainWindow.ts

View workflow job for this annotation

GitHub Actions / tests / tests (windows-latest)

tests/unit.spec.ts > Should restore an existing window

TypeError: Cannot read properties of undefined (reading 'session') ❯ Module.restoreOrCreateWindow src/mainWindow.ts:90:22 ❯ tests/unit.spec.ts:75:3

Check failure on line 90 in packages/main/src/mainWindow.ts

View workflow job for this annotation

GitHub Actions / tests / tests (windows-latest)

tests/unit.spec.ts > Should create a new window if the previous one was destroyed

TypeError: Cannot read properties of undefined (reading 'session') ❯ Module.restoreOrCreateWindow src/mainWindow.ts:90:22 ❯ tests/unit.spec.ts:89:3

Check failure on line 90 in packages/main/src/mainWindow.ts

View workflow job for this annotation

GitHub Actions / tests / tests (macos-latest)

tests/unit.spec.ts > Should create a new window

TypeError: Cannot read properties of undefined (reading 'session') ❯ Module.restoreOrCreateWindow src/mainWindow.ts:90:22 ❯ tests/unit.spec.ts:58:3

Check failure on line 90 in packages/main/src/mainWindow.ts

View workflow job for this annotation

GitHub Actions / tests / tests (macos-latest)

tests/unit.spec.ts > Should restore an existing window

TypeError: Cannot read properties of undefined (reading 'session') ❯ Module.restoreOrCreateWindow src/mainWindow.ts:90:22 ❯ tests/unit.spec.ts:75:3

Check failure on line 90 in packages/main/src/mainWindow.ts

View workflow job for this annotation

GitHub Actions / tests / tests (macos-latest)

tests/unit.spec.ts > Should create a new window if the previous one was destroyed

TypeError: Cannot read properties of undefined (reading 'session') ❯ Module.restoreOrCreateWindow src/mainWindow.ts:90:22 ❯ tests/unit.spec.ts:89:3
activeDownloads.push(item);
item.on('done', () => {
activeDownloads = activeDownloads.filter(dl => dl !== item);
activeDownloads = activeDownloads.filter(_item => _item !== item);
});
});

window.on('close', _ => {
// Cancel all active downloads
activeDownloads.forEach(dlItem => {
if (dlItem.getState() === 'progressing') {
dlItem.cancel();
activeDownloads.forEach(item => {
if (item.getState() === 'progressing') {
item.cancel();
}
});
});
Expand Down

0 comments on commit ed9493e

Please sign in to comment.