Merge pull request #12286 from overleaf/msm-fix-sp-react

[web] Fix Null Pointer Exception with `templateLinks` in CE/SP

GitOrigin-RevId: 3b5597e70e73bc605bece3d2f463f58c01acac8e
This commit is contained in:
Miguel Serrano 2023-03-20 15:53:52 +01:00 committed by Copybot
parent e6a8f3d04f
commit aee777ca1d
2 changed files with 2 additions and 2 deletions

View file

@ -221,7 +221,7 @@ function NewProjectButton({
) : null} ) : null}
<MenuItem divider /> <MenuItem divider />
<MenuItem header>{t('templates')}</MenuItem> <MenuItem header>{t('templates')}</MenuItem>
{templateLinks.map((templateLink, index) => ( {templateLinks?.map((templateLink, index) => (
<MenuItem <MenuItem
key={`new-project-button-template-${index}`} key={`new-project-button-template-${index}`}
href={templateLink.url} href={templateLink.url}

View file

@ -37,6 +37,6 @@ export type ExposedSettings = {
siteUrl: string siteUrl: string
textExtensions: string[] textExtensions: string[]
validRootDocExtensions: string[] validRootDocExtensions: string[]
templateLinks: TemplateLink[] templateLinks?: TemplateLink[]
labsEnabled: boolean labsEnabled: boolean
} }