Add no-param-reassign from eslint (#3089)

While waiting for the easterbunny I cleaned up some bad coding practice
:-)

Very open for comments especially regarding the places I commented
myself...

---------

Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
Veeck
2023-04-16 17:38:39 +02:00
committed by GitHub
parent 979f4ec664
commit 7e58b38ddf
18 changed files with 245 additions and 237 deletions

View File

@@ -100,6 +100,7 @@ const CalendarUtils = {
* @returns {string} The transformed title.
*/
titleTransform: function (title, titleReplace) {
let transformedTitle = title;
for (let needle in titleReplace) {
const replacement = titleReplace[needle];
@@ -109,9 +110,9 @@ const CalendarUtils = {
needle = new RegExp(regParts[1], regParts[2]);
}
title = title.replace(needle, replacement);
transformedTitle = transformedTitle.replace(needle, replacement);
}
return title;
return transformedTitle;
}
};