fix: check if today_button is defined before use it

This commit is contained in:
thomasync 2024-09-19 14:17:07 +02:00
parent 6f97f816f1
commit e5a3a3bfca

View File

@ -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() {