Skip to content

Commit bea4a1d

Browse files
committed
check for existence of entities[0] before accessing 'parent'
1 parent 6cda947 commit bea4a1d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

editor/client/panning-and-selection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ export class CameraPanBehavior extends Behavior {
628628
return 0;
629629
});
630630

631-
if (entities[0].parent instanceof EmptyFacade) {
631+
if (entities[0] && entities[0].parent instanceof EmptyFacade) {
632632
if (this.#lastParentPrepended !== entities[0].parent) {
633633
this.#lastParentPrepended = entities[0].parent;
634634
entities.unshift(entities[0].parent);

0 commit comments

Comments
 (0)