From aab2397043b20ae2b7f3898f5888bf2c4f4a9cf4 Mon Sep 17 00:00:00 2001 From: Agampreet Singh <68941022+agam778@users.noreply.github.com> Date: Mon, 12 Jun 2023 13:16:29 +0530 Subject: [PATCH] Use a better way to check menu item --- app/menu.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/app/menu.js b/app/menu.js index 06e2eb8..6b410d9 100644 --- a/app/menu.js +++ b/app/menu.js @@ -207,9 +207,7 @@ const menulayout = [ buttons: ["OK"], }); }, - checked: getValue("websites-in-new-window") - ? getValue("websites-in-new-window") === "true" - : true, + checked: getValue("websites-in-new-window") === "true", }, { label: "Open Websites in the Same Window", @@ -224,9 +222,7 @@ const menulayout = [ buttons: ["OK"], }); }, - checked: getValue("websites-in-new-window") - ? getValue("websites-in-new-window") === "false" - : false, + checked: getValue("websites-in-new-window") === "false", }, { type: "separator" }, { @@ -581,9 +577,7 @@ const menulayout = [ buttons: ["OK"], }); }, - checked: getValue("websites-in-new-window") - ? getValue("websites-in-new-window") === "true" - : true, + checked: getValue("websites-in-new-window") === "true", }, { label: "Open Websites in the Same Window", @@ -598,9 +592,7 @@ const menulayout = [ buttons: ["OK"], }); }, - checked: getValue("websites-in-new-window") - ? getValue("websites-in-new-window") === "false" - : false, + checked: getValue("websites-in-new-window") === "false", }, { type: "separator" }, {