fix: restore from invalid fixedSegments & type-safer point updates (#9899)
* fix: restore from invalid fixedSegments & type-safer point updates * fix: Type updates and throw for invalid point states --------- Co-authored-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
co-authored by
Mark Tolmacs
parent
90ec2739ae
commit
531f3e5524
@@ -387,7 +387,10 @@ export const restoreElement = (
|
||||
elbowed: true,
|
||||
startBinding: repairBinding(element, element.startBinding),
|
||||
endBinding: repairBinding(element, element.endBinding),
|
||||
fixedSegments: element.fixedSegments,
|
||||
fixedSegments:
|
||||
element.fixedSegments?.length && base.points.length >= 4
|
||||
? element.fixedSegments
|
||||
: null,
|
||||
startIsSpecial: element.startIsSpecial,
|
||||
endIsSpecial: element.endIsSpecial,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user