Skip to content

Commit

Permalink
fix: eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
kubabutkiewicz committed Nov 8, 2024
1 parent 72a4946 commit c5f3847
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions desktop/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ process.argv.forEach((arg) => {
return;
}

expectedUpdateVersion = arg.substr(`${EXPECTED_UPDATE_VERSION_FLAG}=`.length);
expectedUpdateVersion = arg.substring(`${EXPECTED_UPDATE_VERSION_FLAG}=`.length);
});

// Add the listeners and variables required to ensure that auto-updating
Expand Down Expand Up @@ -513,9 +513,8 @@ const mainWindow = (): Promise<void> => {
// open the default browser instead of a new electron window
browserWindow.webContents.setWindowOpenHandler(({url}) => {
const denial = {action: 'deny'} as const;

// Make sure local urls stay in electron perimeter
if (url.substr(0, 'file://'.length).toLowerCase() === 'file://') {
if (url.substring(0, 'file://'.length).toLowerCase() === 'file://') {
return denial;
}

Expand Down

0 comments on commit c5f3847

Please sign in to comment.