1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

check event event_theme_ids if exist

This commit is contained in:
Du Peng 2021-09-09 18:25:26 +02:00
parent 2f7325fee4
commit 334d8ce055

View File

@ -46,7 +46,7 @@ const EventThemes: React.FC<EventThemesProps> = ({ event, onChange }) => {
const defaultValues = (): Array<selectOption> => {
const res = [];
themes.forEach(t => {
if (event.event_theme_ids.indexOf(t.id) > -1) {
if (event.event_theme_ids && event.event_theme_ids.indexOf(t.id) > -1) {
res.push({ value: t.id, label: t.name });
}
});