ELECTRON-479: fix launch on startup issue on first time launch (#375)

- fix launch on startup first time launch issue
This commit is contained in:
Vishwas Shashidhar 2018-05-22 13:55:47 +05:30 committed by GitHub
parent 8583da7e1b
commit ed04aacd73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,9 +301,12 @@ function setupFirstTimeLaunch() {
* @returns {Promise}
*/
function setStartup(lStartup) {
log.send(logLevels.INFO, `launch on startup parameter value is ${lStartup}`);
return new Promise((resolve) => {
let launchOnStartup = (lStartup === 'true');
let launchOnStartup = (String(lStartup) === 'true');
log.send(logLevels.INFO, `launchOnStartup value is ${launchOnStartup}`);
if (launchOnStartup) {
log.send(logLevels.INFO, `enabling launch on startup`);
symphonyAutoLauncher.enable();
return resolve();
}