Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/diff-match-patch.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 === '-') {
Expand Down Expand Up @@ -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;
Expand Down
Loading