Skip to content

Commit

Permalink
Merge pull request #437 from thomasync/fix-today-button
Browse files Browse the repository at this point in the history
fix: check if today_button is defined before use it
  • Loading branch information
safwansamsudeen authored Sep 19, 2024
2 parents 6f97f81 + e5a3a3b commit b834da1
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 b834da1

Please sign in to comment.