Skip to content

Commit

Permalink
Add safety check for style properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
theduckylittle committed Jun 15, 2023
1 parent e13e091 commit 223a848
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/gm3/components/measure/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ export class MeasureTool extends Component {

const iconProps = {};
if (live === false) {
iconProps.outline = properties.outlineColor;
iconProps.stroke = properties.coreColor;
iconProps.outline = properties?.outlineColor;
iconProps.stroke = properties?.coreColor;
}

return (
Expand Down Expand Up @@ -235,8 +235,8 @@ export class MeasureTool extends Component {
};

if (live === false) {
iconProps.outline = properties.outlineColor;
iconProps.stroke = properties.coreColor;
iconProps.outline = properties?.outlineColor;
iconProps.stroke = properties?.coreColor;
}

// trailing space in the constructed string is intentional.
Expand Down Expand Up @@ -305,8 +305,8 @@ export class MeasureTool extends Component {
<tr key="header">
<th>
<PointIcon
stroke={properties.outlineColor}
fill={properties.coreColor}
stroke={properties?.outlineColor}
fill={properties?.coreColor}
/>
</th>
<th style={{ textAlign: "right" }}>
Expand Down

0 comments on commit 223a848

Please sign in to comment.