From 2a590a20bf7176f577a9071d83f26d734d3ad865 Mon Sep 17 00:00:00 2001 From: GreenAsJade Date: Sun, 8 Sep 2024 21:47:37 +0930 Subject: [PATCH] Guard GoThemePicker against trying to persist null elements. --- src/components/GobanThemePicker/GobanThemePicker.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/GobanThemePicker/GobanThemePicker.tsx b/src/components/GobanThemePicker/GobanThemePicker.tsx index c5078ded43..021a4014ce 100644 --- a/src/components/GobanThemePicker/GobanThemePicker.tsx +++ b/src/components/GobanThemePicker/GobanThemePicker.tsx @@ -107,7 +107,7 @@ export function GobanBoardThemePicker(props: GobanThemePickerProperties): JSX.El style={theme.styles} onClick={selectTheme.current[theme.theme_name]} > - + {canvases.current[idx] && } ))} @@ -173,7 +173,7 @@ export function GobanCustomBoardPicker(props: GobanThemePickerProperties): JSX.E style={theme.styles} onClick={() => setBoard("Custom")} > - + {sample_canvas && } @@ -353,7 +353,9 @@ export function GobanWhiteThemePicker(props: GobanThemePickerProperties): JSX.El }} onClick={selectTheme.current[theme.theme_name]} > - + {canvases.current[idx] && ( + + )} ))} @@ -550,7 +552,9 @@ export function GobanBlackThemePicker(props: GobanThemePickerProperties): JSX.El }} onClick={selectTheme.current[theme.theme_name]} > - + {canvases.current[idx] && ( + + )} ))}