fix local start crash

This commit is contained in:
Vitaly Turovsky 2024-08-16 19:31:25 +03:00
commit 39da2719a8
3 changed files with 5 additions and 2 deletions

View file

@ -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:

View file

@ -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]

View file

@ -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 (
<div className={styles.root}>
@ -113,7 +114,7 @@ export default ({
</span>
<span className={styles['product-description']}>
<div className={styles['product-link']}>
{linksParsed.map(([name, link], i, arr) => {
{linksParsed?.map(([name, link], i, arr) => {
if (!link.startsWith('http')) link = `https://${link}`
return <div style={{
color: 'lightgray',