fix console error in not found locale
This commit is contained in:
parent
d98f4bafa2
commit
b26968fb1f
@ -133,9 +133,12 @@ export default {
|
|||||||
|
|
||||||
created() {
|
created() {
|
||||||
if (this.locale !== 'en') {
|
if (this.locale !== 'en') {
|
||||||
const lang = require(`flatpickr/dist/l10n/${this.locale}.js`).default[this.locale];
|
try {
|
||||||
|
const lang = require(`flatpickr/dist/l10n/${this.locale}.js`).default[this.locale];
|
||||||
this.dateConfig.locale = lang;
|
this.dateConfig.locale = lang;
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user