Skip to content

Commit

Permalink
chore: bulletproofing the shortcuts width calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
raaymax committed Feb 29, 2024
1 parent 5cb5394 commit ddd289b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/src/builder/BuilderInstanceTracker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ const trackElement = (el: HTMLElement) => {
let trackerX = elX;
let trackerY = elY + yAdjustment;
let settingsWidth = document.getElementsByClassName("BuilderSettings")[0].clientWidth;
let settingsWidth =
document.getElementsByClassName("BuilderSettings")?.[0]?.clientWidth ||
0;
if (!isOffBoundsAllowed.value) {
trackerX = Math.max(rendererX, trackerX); // Left boundary
Expand Down

0 comments on commit ddd289b

Please sign in to comment.