diff --git a/src/web/components/dashboard/display/DataDisplay.tsx b/src/web/components/dashboard/display/DataDisplay.tsx
index 826d9dab57..bc71985180 100644
--- a/src/web/components/dashboard/display/DataDisplay.tsx
+++ b/src/web/components/dashboard/display/DataDisplay.tsx
@@ -451,15 +451,17 @@ class DataDisplay<
{!isLoading && (
<>
- {children({
- id,
- data: transformedData,
- width,
- height,
- svgRef: this.svgRef,
- state,
- setState: this.handleSetState,
- })}
+ {typeof children === 'function'
+ ? children({
+ id,
+ data: transformedData,
+ width,
+ height,
+ svgRef: this.svgRef,
+ state,
+ setState: this.handleSetState,
+ })
+ : null}
>
)}
diff --git a/src/web/components/dashboard/display/createDisplay.jsx b/src/web/components/dashboard/display/createDisplay.jsx
index 519a1986fa..ce351a459a 100644
--- a/src/web/components/dashboard/display/createDisplay.jsx
+++ b/src/web/components/dashboard/display/createDisplay.jsx
@@ -30,7 +30,7 @@ const createDisplay = ({
>
{isDefined(Chart)
? displayProps =>
- : undefined}
+ : null}
)}