Update ArrowSession.ts

This commit is contained in:
Steve Ruiz 2022-01-06 14:04:17 +00:00
parent 9255e7a4a5
commit a793fadf74

View file

@ -43,9 +43,12 @@ export class ArrowSession extends BaseSession {
const oppositeHandleBindingId =
this.initialShape.handles[handleId === 'start' ? 'end' : 'start']?.bindingId
if (oppositeHandleBindingId) {
const oppositeToId = page.bindings[oppositeHandleBindingId].toId
// TODO: find out why this the binding here is sometimes missing
const oppositeToId = page.bindings[oppositeHandleBindingId]?.toId
if (oppositeToId) {
this.bindableShapeIds = this.bindableShapeIds.filter((id) => id !== oppositeToId)
}
}
const { originPoint } = this.app
if (this.isCreate) {
// If we're creating a new shape, should we bind its first point?