Skip to content

Commit e92ba8b

Browse files
authored
Merge pull request #58 from alecgibson/linked-op-performance-boost
Improve performance of `getLinkedOps`
2 parents 5c442f7 + 66f6533 commit e92ba8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,10 @@ function getLinkedOps(ops, to, link) {
534534
if (to == null || op.v < to) {
535535
delete op._id;
536536
delete op.o;
537-
linkedOps.unshift(op);
537+
linkedOps.push(op);
538538
}
539539
}
540-
return linkedOps;
540+
return linkedOps.reverse();
541541
}
542542

543543
function getOpsQuery(id, from) {

0 commit comments

Comments
 (0)