From 39da2719a8d5ebff2f7b6add3beb455bb4144b70 Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Fri, 16 Aug 2024 19:31:25 +0300 Subject: [PATCH] fix local start crash --- .github/workflows/next-deploy.yml | 1 + .github/workflows/publish.yml | 1 + src/react/MainMenu.tsx | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/next-deploy.yml b/.github/workflows/next-deploy.yml index a04c3da4..b3e7c1d2 100644 --- a/.github/workflows/next-deploy.yml +++ b/.github/workflows/next-deploy.yml @@ -3,6 +3,7 @@ env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} ALIASES: ${{ vars.ALIASES }} + MAIN_MENU_LINKS: ${{ secrets.MAIN_MENU_LINKS }} on: push: branches: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ddc4cde6..cc06bfb0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,6 +2,7 @@ name: Release env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + MAIN_MENU_LINKS: ${{ secrets.MAIN_MENU_LINKS }} on: push: branches: [release] diff --git a/src/react/MainMenu.tsx b/src/react/MainMenu.tsx index f39bc25e..ac7e73d7 100644 --- a/src/react/MainMenu.tsx +++ b/src/react/MainMenu.tsx @@ -38,7 +38,8 @@ export default ({ onVersionClick, bottomRightLinks }: Props) => { - const linksParsed = (bottomRightLinks ?? '').split(';').map(l => l.split(':')) as Array<[string, string]> + if (!bottomRightLinks?.trim()) bottomRightLinks = undefined + const linksParsed = bottomRightLinks?.split(';').map(l => l.split(':')) as Array<[string, string]> | undefined return (
@@ -113,7 +114,7 @@ export default ({
- {linksParsed.map(([name, link], i, arr) => { + {linksParsed?.map(([name, link], i, arr) => { if (!link.startsWith('http')) link = `https://${link}` return