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,8 +540,10 @@ export default class Gantt {
'px';
// Update the left value on page resize
if (this.$today_button) {
this.$today_button.style.left = `${containerRect.left + 20}px`;
}
}
make_grid_ticks() {
if (!['both', 'vertical', 'horizontal'].includes(this.options.lines))