Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit 6e6578c

Browse files
author
Dom Harrington
committed
Fix issue where uglify'ing the component made objects render incorrectly
1 parent 00e53f2 commit 6e6578c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/api-explorer-ui/src/form-components/FieldTemplate.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const React = require('react');
22
const PropTypes = require('prop-types');
3+
const CustomObjectField = require('./ObjectField');
34

45
function CustomFieldTemplate(props) {
56
const { id, label, help, required, description, errors, children, schema, labelPrefix } = props;
@@ -8,7 +9,7 @@ function CustomFieldTemplate(props) {
89
return children;
910
}
1011

11-
const isObject = children.type.name === 'CustomObjectField';
12+
const isObject = children.type.name === CustomObjectField.name;
1213
const combinedLabel = [labelPrefix, label].filter(Boolean).join('.');
1314

1415
return (

0 commit comments

Comments
 (0)