diff --git a/src/diff-match-patch.class.ts b/src/diff-match-patch.class.ts index e5f3548..ecda293 100644 --- a/src/diff-match-patch.class.ts +++ b/src/diff-match-patch.class.ts @@ -779,10 +779,10 @@ export class DiffMatchPatch { let line: string | undefined; try { line = decodeURI(text[textPointer].substring(1)); - } catch (_ex) { + } catch (ex) { // Malformed URI sequence. throw new Error('Illegal escape in patch_fromText: ' + line, { - cause: _ex, + cause: ex, }); } if (sign === '-') { @@ -1879,10 +1879,10 @@ export class DiffMatchPatch { case '+': { try { diffs[diffsLength++] = [DiffOp.Insert, decodeURI(param)]; - } catch (_ex) { + } catch (ex) { // Malformed URI sequence. throw new Error('Illegal escape in diff_fromDelta: ' + param, { - cause: _ex, + cause: ex, }); } break;