Merge pull request #437 from thomasync/fix-today-button
fix: check if today_button is defined before use it
This commit is contained in:
commit
b834da1ad5
@ -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))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user