Commit bb31fb9e authored by Kev's avatar Kev

Fix eslint errors (even tho I prefer for..of)

parent 2607a42d
......@@ -323,8 +323,11 @@ const unicodeConversion = [
[/ö/g, 'oe'],
[/ü/g, 'ue'],
[/ä/g, 'ae'],
// eslint-disable-next-line @gitlab/require-i18n-strings
[/Ö/g, 'Oe'],
// eslint-disable-next-line @gitlab/require-i18n-strings
[/Ü/g, 'Ue'],
// eslint-disable-next-line @gitlab/require-i18n-strings
[/Ä/g, 'Ae'],
];
......@@ -338,11 +341,13 @@ const unicodeConversion = [
* @returns {String}
*/
export const convertUnicodeToAscii = string => {
for (let [regex, replacer] of unicodeConversion) {
string = string.replace(regex, replacer);
}
let convertedString = string;
return string;
unicodeConversion.forEach(([regex, replacer]) => {
convertedString = convertedString.replace(regex, replacer);
});
return convertedString;
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment