From daed2aa64bc3716da014fe141ead0aa1e8941bdf Mon Sep 17 00:00:00 2001 From: "Hung-Han (Henry) Chen" Date: Mon, 4 Oct 2021 15:15:32 +0300 Subject: [PATCH] Fix react error in 'Objects are not valid as a React child (found: object with keys {}).' Signed-off-by: Hung-Han (Henry) Chen --- src/renderer/components/icon/icon.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/icon/icon.tsx b/src/renderer/components/icon/icon.tsx index ee24b6e3fa..48dfb51820 100644 --- a/src/renderer/components/icon/icon.tsx +++ b/src/renderer/components/icon/icon.tsx @@ -114,14 +114,14 @@ export class Icon extends React.PureComponent { }; // render as inline svg-icon - if (svg) { + if (typeof svg === "string") { const svgIconText = svg.includes("; } // render as material-icon - if (material) { + if (typeof material === "string") { iconContent = {material}; }