Skip to content

Commit a5b15ab

Browse files
committedApr 13, 2021
Back to old swap
1 parent 7cc6bb4 commit a5b15ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎mod.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ const myers_x = (b: string, a: string) => {
113113

114114
const distance = (a: string, b: string): number => {
115115
if (a.length < b.length) {
116-
[b, a] = [a, b];
116+
const tmp = b;
117+
b = a;
118+
a = tmp;
117119
}
118120
if (b.length === 0) {
119121
return a.length;

0 commit comments

Comments
 (0)
Please sign in to comment.