Merge pull request #437 from thomasync/fix-today-button

fix: check if today_button is defined before use it
This commit is contained in:
Safwan Samsudeen 2024-09-19 19:28:52 +05:30 committed by GitHub
commit b834da1ad5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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