Fix local flag icon url

This commit is contained in:
SleepWalker 2019-12-25 13:30:47 +02:00
parent d5e0e9a7fb
commit 6373e95e5c

View File

@ -28,7 +28,11 @@ export default {
* @returns {string} * @returns {string}
*/ */
getIconUrl(locale: string): string { getIconUrl(locale: string): string {
return require(`flag-icon-css/flags/4x3/${localeToCountryCode[locale] || // eslint-disable-next-line @typescript-eslint/no-var-requires
locale}.svg`); const mod = require(`flag-icon-css/flags/4x3/${localeToCountryCode[
locale
] || locale}.svg`);
return mod.default || mod;
}, },
}; };