Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/src/components/settings/PolygonCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export function PolygonCanvas({
const activePolygon = updatedPolygons[activePolygonIndex];

// add default points order for already completed polygons
if (!activePolygon.pointsOrder && activePolygon.isFinished) {
if (!activePolygon?.pointsOrder && activePolygon?.isFinished) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you seeing crashes here? Why was this change necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you seeing crashes here? Why was this change necessary?

yup, crashes may occur after saving, but the cause remains unknown.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've never had reports of crashes here. It would be good to make sure your changes are not causing an issue.

updatedPolygons[activePolygonIndex] = {
...activePolygon,
pointsOrder: activePolygon.points.map((_, index) => index),
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/settings/ZoneEditPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export default function ZoneEditPane({
mode: "onBlur",
defaultValues: {
name: polygon?.name ?? "",
friendly_name: polygon?.friendly_name ?? "",
friendly_name: polygon?.friendly_name ?? polygon?.name,
inertia:
polygon?.camera &&
polygon?.name &&
Expand Down