Skip to content

Commit

Permalink
SDA-4380 - fix userDataPath validation
Browse files Browse the repository at this point in the history
  • Loading branch information
KiranNiranjan committed Nov 2, 2023
1 parent 8b87d72 commit 6325b23
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/app/auto-launch-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AutoLaunchController {
*/
public enableAutoLaunch(): void {
const { userDataPath } = config.getConfigFields(['userDataPath']);
if (userDataPath === '') {
if (!userDataPath) {
app.setLoginItemSettings({ openAtLogin: true, path: props.path });
} else {
app.setLoginItemSettings({
Expand Down Expand Up @@ -67,9 +67,8 @@ class AutoLaunchController {
const { launchOnStartup }: IConfig = config.getConfigFields([
'launchOnStartup',
]);
const {
openAtLogin: isAutoLaunchEnabled,
}: LoginItemSettings = this.isAutoLaunchEnabled();
const { openAtLogin: isAutoLaunchEnabled }: LoginItemSettings =
this.isAutoLaunchEnabled();

if (launchOnStartup === CloudConfigDataTypes.ENABLED) {
if (!isAutoLaunchEnabled) {
Expand Down

0 comments on commit 6325b23

Please sign in to comment.