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

Commit

Permalink
Fix issue where uglify'ing the component made objects render incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Harrington committed Dec 7, 2017
1 parent 00e53f2 commit 6e6578c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const React = require('react');
const PropTypes = require('prop-types');
const CustomObjectField = require('./ObjectField');

function CustomFieldTemplate(props) {
const { id, label, help, required, description, errors, children, schema, labelPrefix } = props;
Expand All @@ -8,7 +9,7 @@ function CustomFieldTemplate(props) {
return children;
}

const isObject = children.type.name === 'CustomObjectField';
const isObject = children.type.name === CustomObjectField.name;
const combinedLabel = [labelPrefix, label].filter(Boolean).join('.');

return (
Expand Down

0 comments on commit 6e6578c

Please sign in to comment.