1
0
Fork 0

chore(react-components): Tweaks to pattern

This commit is contained in:
joostdecock 2023-06-04 16:52:20 +02:00
parent ab6511f4b9
commit 57457ee841
2 changed files with 5 additions and 2 deletions

View file

@ -7,7 +7,8 @@ const grids = {
}
export const Defs = (props) => {
let defs = props.svg.defs.render()
if (!props.svg) return null
let defs = props.svg.defs.forSvg
if (props.settings[0].paperless) {
defs += grids[props.settings[0].units || 'metric']
for (let p in props.parts[0]) {

View file

@ -14,7 +14,9 @@ export const Path = ({ stackName, pathName, path, partName, part, settings, comp
return (
<>
<path id={pathId} d={path.d} {...getProps(path)} />
{path.attributes.text.length > 0 ? <TextOnPath {...{ path, pathId, t }} /> : null}
{path.attributes.text && path.attributes.text.length > 0 ? (
<TextOnPath {...{ path, pathId, t }} />
) : null}
</>
)