Remove unnecessary require

This commit is contained in:
Manav Rathi 2024-04-10 17:07:11 +05:30
parent 11451efffd
commit d913cbeae5
No known key found for this signature in database

View file

@ -1,4 +1,4 @@
import { app, BrowserWindow, nativeImage, Tray } from "electron";
import { BrowserWindow, Tray, app, nativeImage, shell } from "electron";
import { existsSync } from "node:fs";
import path from "node:path";
import { isAppQuitting, rendererURL } from "../main";
@ -109,7 +109,7 @@ export function handleDownloads(mainWindow: BrowserWindow) {
export function handleExternalLinks(mainWindow: BrowserWindow) {
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
if (!url.startsWith(rendererURL)) {
require("electron").shell.openExternal(url);
shell.openExternal(url);
return { action: "deny" };
} else {
return { action: "allow" };