mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
lint
This commit is contained in:
6
index.js
6
index.js
@ -263,12 +263,12 @@ app.on("ready", () => {
|
||||
try { // check if shortcut is registered and valid
|
||||
const shortcutDetails = electron.shell.readShortcutLink(shortcutPath); // throw error if doesn't exist yet
|
||||
if (shortcutDetails.target !== appLocation || shortcutDetails.appUserModelId !== appID) {
|
||||
throw undefined;
|
||||
throw "needUpdate";
|
||||
}
|
||||
} catch { // if not valid -> Register shortcut
|
||||
} catch (error) { // if not valid -> Register shortcut
|
||||
electron.shell.writeShortcutLink(
|
||||
shortcutPath,
|
||||
"create",
|
||||
error === "needUpdate" ? "update" : "create",
|
||||
{
|
||||
target: appLocation,
|
||||
cwd: appLocation.slice(0, appLocation.lastIndexOf(path.sep)),
|
||||
|
||||
Reference in New Issue
Block a user