mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Merge pull request #32779 from overleaf/mj-project-history-bug
[project-history] Fix broken ranges from history resync GitOrigin-RevId: c839e1d187768b7ce3411d06f78f017ebf7fec6e
This commit is contained in:
committed by
Copybot
parent
e3ebc52334
commit
cae558af69
@@ -314,6 +314,15 @@ function _concatTwoUpdates(firstUpdate, secondUpdate) {
|
||||
return [firstUpdate, secondUpdate]
|
||||
}
|
||||
|
||||
if (firstUpdate.meta.resync || secondUpdate.meta.resync) {
|
||||
// Do not merge ops where one of them is a resync. We produce a list of
|
||||
// resync ops that first corrects the content, then the ranges. By
|
||||
// compressing the content updates seperately from the ranges updates,
|
||||
// the ranges can become out-of-sync. To stop this, disallow compressing
|
||||
// any resync updates.
|
||||
return [firstUpdate, secondUpdate]
|
||||
}
|
||||
|
||||
if (firstUpdate.meta.user_id !== secondUpdate.meta.user_id) {
|
||||
return [firstUpdate, secondUpdate]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user