mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-07 22:05:44 +03:00
fix: fix the issue where the input field was empty when there was no friendly_name
This commit is contained in:
parent
2339b5f35d
commit
894f9d06dd
@ -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) {
|
||||
updatedPolygons[activePolygonIndex] = {
|
||||
...activePolygon,
|
||||
pointsOrder: activePolygon.points.map((_, index) => index),
|
||||
|
||||
@ -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 &&
|
||||
|
||||
Loading…
Reference in New Issue
Block a user