diff --git a/web/src/services/Assertion.service.ts b/web/src/services/Assertion.service.ts index 2c9f39e132..a5bc923e6a 100644 --- a/web/src/services/Assertion.service.ts +++ b/web/src/services/Assertion.service.ts @@ -41,8 +41,8 @@ const AssertionService = () => ({ // \\' ==> \\' let newString = ''; let lastCharacter = ''; - for (let i = 0; i < str.length; i++) { - if (str[i] == quoteCharacter && lastCharacter != '\\') { + for (let i = 0; i < str.length; i += 1) { + if (str[i] === quoteCharacter && lastCharacter !== '\\') { newString += `\\${quoteCharacter}`; } else { newString += str[i];