Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

Commit 62be8bf

Browse files
author
Paul Korzhyk
authored
Merge pull request #33 from janbehrens/master
bugfix: txn failing on large arrays
2 parents 6565516 + 9c9f583 commit 62be8bf

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/txn.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ export class Txn {
123123
});
124124
}
125125
mergeArrays(a, b) {
126-
const res = a.slice();
127-
res.push(...b);
126+
const res = a.slice().concat(b);
128127
res.sort();
129128
return res.filter((item, idx, arr) => idx === 0 || arr[idx - 1] !== item);
130129
}

src/txn.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ export class Txn {
200200
}
201201

202202
private mergeArrays(a: string[], b: string[]) {
203-
const res = a.slice();
204-
res.push(...b);
203+
const res = a.slice().concat(b);
205204
res.sort();
206205
// Filter unique in a sorted array.
207206
return res.filter(

0 commit comments

Comments
 (0)