Fix locale label for other than english/indonesia

pull/1/head
Made Baruna 2021-03-14 20:03:39 +08:00
parent 7ca1b28cea
commit 858856e7f2
1 changed files with 2 additions and 2 deletions

View File

@ -23,8 +23,8 @@
{ id: 'en', label: 'English' },
{ id: 'id', label: 'Indonesia' },
];
$: locales = languages.filter((e) => e.id !== $locale.substring(0, 2));
$: currentLocale = languages.find((e) => e.id === $locale.substring(0, 2));
$: currentLocale = languages.find((e) => e.id === $locale.substring(0, 2)) || { id: 'en', label: 'English' };
$: locales = languages.filter((e) => e.id !== currentLocale.id);
function openDonationModal() {
openModal(