Skip to content

Commit

Permalink
BaseMode's render returns if no dp.el.firstChild
Browse files Browse the repository at this point in the history
Occasionally, after about 8 instances of of the datepicker, the firstChild is undefined and crashes the datepicker. Changing "if (!dp.el)" to "if (!dp.el || !dp.el.firstChild)" fixes this issue.
  • Loading branch information
ericconstantinides authored Oct 18, 2018
1 parent 98c1186 commit ab06a71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/tiny-date-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@
},

render: function () {
if (!dp.el) {
if (!dp.el || !dp.el.firstChild) {
return;
}

Expand Down

0 comments on commit ab06a71

Please sign in to comment.