Skip to content

Commit

Permalink
fix: Disabled submenus if not availiable
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkoelle committed May 19, 2021
1 parent f935b3c commit 404d15e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/menu/FileMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const buildFileMenu = (
},
{
label: 'Open recent files',
disabled: recentPaths.length <= 0,
submenu: recentPaths
? recentPaths.map((path) => {
return {
Expand Down Expand Up @@ -206,6 +207,7 @@ const buildFileMenu = (
},
{
label: 'Export Corrections',
disabled: sheets.length <= 0,
submenu: sheets.map((s) => {
return {
label: s.name,
Expand Down

0 comments on commit 404d15e

Please sign in to comment.