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 = [ ...@@ -323,8 +323,11 @@ const unicodeConversion = [
[/ö/g, 'oe'], [/ö/g, 'oe'],
[/ü/g, 'ue'], [/ü/g, 'ue'],
[/ä/g, 'ae'], [/ä/g, 'ae'],
// eslint-disable-next-line @gitlab/require-i18n-strings
[/Ö/g, 'Oe'], [/Ö/g, 'Oe'],
// eslint-disable-next-line @gitlab/require-i18n-strings
[/Ü/g, 'Ue'], [/Ü/g, 'Ue'],
// eslint-disable-next-line @gitlab/require-i18n-strings
[/Ä/g, 'Ae'], [/Ä/g, 'Ae'],
]; ];
...@@ -338,11 +341,13 @@ const unicodeConversion = [ ...@@ -338,11 +341,13 @@ const unicodeConversion = [
* @returns {String} * @returns {String}
*/ */
export const convertUnicodeToAscii = string => { export const convertUnicodeToAscii = string => {
for (let [regex, replacer] of unicodeConversion) { let convertedString = string;
string = string.replace(regex, replacer);
}
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