Skip to content

Commit

Permalink
fix(datepicker): prevent double initialization on datepicker componen…
Browse files Browse the repository at this point in the history
…ts (#752)

fix #751
  • Loading branch information
chrispymm authored Sep 19, 2024
1 parent 10e3047 commit 7f84baf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/moj/components/date-picker/date-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ Datepicker.prototype.init = function () {
if (!this.$input) {
return;
}
if (this.$module.dataset.initialized) {
return;
}

this.setOptions();
this.initControls();
this.$module.setAttribute('data-initialized', 'true')
};

Datepicker.prototype.initControls = function () {
Expand Down

0 comments on commit 7f84baf

Please sign in to comment.