Skip to content

Commit

Permalink
fix: check if today_button is defined before use it
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasync committed Sep 19, 2024
1 parent 6f97f81 commit e5a3a3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,9 @@ export default class Gantt {
'px';

// Update the left value on page resize
this.$today_button.style.left = `${containerRect.left + 20}px`;
if (this.$today_button) {
this.$today_button.style.left = `${containerRect.left + 20}px`;
}
}

make_grid_ticks() {
Expand Down

0 comments on commit e5a3a3b

Please sign in to comment.