fix console error in not found locale

This commit is contained in:
Ali Hashemi 2021-12-14 12:05:56 +03:30
parent d98f4bafa2
commit b26968fb1f

View File

@ -133,9 +133,12 @@ export default {
created() {
if (this.locale !== 'en') {
const lang = require(`flatpickr/dist/l10n/${this.locale}.js`).default[this.locale];
this.dateConfig.locale = lang;
try {
const lang = require(`flatpickr/dist/l10n/${this.locale}.js`).default[this.locale];
this.dateConfig.locale = lang;
}
catch (e) {
}
}
},