Skip to content

Commit

Permalink
Avoid errors from breakpoint split view related to getBoundingClientR…
Browse files Browse the repository at this point in the history
…ect on null track (#1559)
  • Loading branch information
cmdcolin authored Dec 13, 2020
1 parent e96d77b commit d8ca43a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/breakpoint-split-view/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ function heightFromSpecificLevel(
trackConfigId: string,
level: number,
) {
return views[level].trackRefs[trackConfigId].getBoundingClientRect().top
const track = views[level].trackRefs[trackConfigId]
return track?.getBoundingClientRect().top || 0
}

export function getPxFromCoordinate(
Expand Down

0 comments on commit d8ca43a

Please sign in to comment.