Fix to ignore modified styleSpec.

This commit is contained in:
orangemug 2020-01-24 17:46:43 +00:00
parent b31537e063
commit 9b4d924dff

View file

@ -19,12 +19,19 @@ export default class SpecDoc extends React.Component {
macos: "macOS", macos: "macOS",
}; };
const renderValues = (
!!values &&
// HACK: Currently we merge additional values into the stylespec, so this is required
// See <https://github.com/maputnik/editor/blob/master/src/components/fields/PropertyGroup.jsx#L16>
!Array.isArray(values)
);
return ( return (
<> <>
{doc && {doc &&
<div className="SpecDoc"> <div className="SpecDoc">
<div className="SpecDoc__doc">{doc}</div> <div className="SpecDoc__doc">{doc}</div>
{values && {renderValues &&
<ul className="SpecDoc__values"> <ul className="SpecDoc__values">
{Object.entries(values).map(([key, value]) => { {Object.entries(values).map(([key, value]) => {
return ( return (