From b26968fb1f85d1aa8bc367c3a4caa9475bd2bcd6 Mon Sep 17 00:00:00 2001 From: Ali Hashemi Date: Tue, 14 Dec 2021 12:05:56 +0330 Subject: [PATCH] fix console error in not found locale --- resources/assets/js/components/AkauntingDate.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/assets/js/components/AkauntingDate.vue b/resources/assets/js/components/AkauntingDate.vue index 4a7b5ac39..3547a2a00 100644 --- a/resources/assets/js/components/AkauntingDate.vue +++ b/resources/assets/js/components/AkauntingDate.vue @@ -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) { + } } }, @@ -151,7 +154,7 @@ export default { methods: { change() { this.$emit('interface', this.real_model); - + this.$emit('change', this.real_model); },