Skip to content

Commit

Permalink
Nullity check for $refs.root (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
kf99916 authored Apr 13, 2022
1 parent 5c84f61 commit 50d7495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export default {
*/
modelValue(newValue) {
// Prevent updates if v-model value is same as input's current value
if (newValue === nullify(this.$refs.root.value)) return;
if (!this.$refs.root || newValue === nullify(this.$refs.root.value)) return;
// Make sure we have a flatpickr instance
this.fp &&
// Notify flatpickr instance that there is a change in value
Expand Down

0 comments on commit 50d7495

Please sign in to comment.