From 7e805662d14ca1304b41ea0caaf3137aa3bf02f8 Mon Sep 17 00:00:00 2001 From: Peter Makra <6892971+mcraa@users.noreply.github.com> Date: Wed, 14 Dec 2022 15:48:48 +0100 Subject: [PATCH] check if modal children is aray --- lib/gui/app/styled-components.tsx | 2 +- lib/gui/etcher.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gui/app/styled-components.tsx b/lib/gui/app/styled-components.tsx index 3bd78c1a..22dd02d2 100644 --- a/lib/gui/app/styled-components.tsx +++ b/lib/gui/app/styled-components.tsx @@ -142,7 +142,7 @@ export const Modal = styled(({ style, children, ...props }) => { {...props} > - {...children} + {children.length ? children.map((c: any) => <>{c}) : children} ); diff --git a/lib/gui/etcher.ts b/lib/gui/etcher.ts index 38dab53b..51549645 100644 --- a/lib/gui/etcher.ts +++ b/lib/gui/etcher.ts @@ -29,7 +29,7 @@ import { delay, getConfig } from '../shared/utils'; import * as settings from './app/models/settings'; import { logException } from './app/modules/analytics'; import { buildWindowMenu } from './menu'; -import i18n from 'i18next'; +import * as i18n from 'i18next'; const customProtocol = 'etcher'; const scheme = `${customProtocol}://`;