Skip to content

The swiss army knife of lossless video/audio editing

fix error dialog show up when starting from default app

skbeh3c2ebe0abfaa
diff --git a/public/electron.js b/public/electron.js
index 671a93df..4ab35697 100644
--- a/public/electron.js
+++ b/public/electron.js
@@ -140,7 +140,7 @@ function openFilesEventually(paths) {
// https://github.com/mifi/lossless-cut/issues/639
// https://github.com/mifi/lossless-cut/issues/591
function parseCliArgs(rawArgv = process.argv) {
- const ignoreFirstArgs = isDev ? 2 : 1;
+ const ignoreFirstArgs = process.defaultApp ? 2 : 1;
// production: First arg is the LosslessCut executable
// dev: First 2 args are electron and the electron.js
const argsWithoutAppName = rawArgv.length > ignoreFirstArgs ? rawArgv.slice(ignoreFirstArgs) : [];