From c5f38477a95b1b48e155e7639320f4f42d068f89 Mon Sep 17 00:00:00 2001 From: kubabutkiewicz Date: Fri, 8 Nov 2024 14:31:02 +0100 Subject: [PATCH] fix: eslint --- desktop/main.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/desktop/main.ts b/desktop/main.ts index fcdd5b91303..ba8eb32b8ea 100644 --- a/desktop/main.ts +++ b/desktop/main.ts @@ -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 @@ -513,9 +513,8 @@ const mainWindow = (): Promise => { // 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; }