diff options
Diffstat (limited to 'src/sync.rs')
| -rw-r--r-- | src/sync.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sync.rs b/src/sync.rs index d9f629e..07ed1a0 100644 --- a/src/sync.rs +++ b/src/sync.rs @@ -458,6 +458,12 @@ pub(crate) async fn run_change_publisher(state: AppState) { return (heads, Vec::new(), Vec::new()); } + // After an epoch switch the previous heads belong to the old document: + // report the root as changed, which every stream is related to. + if !before.iter().all(|h| doc.get_change_by_hash(h).is_some()) { + return (heads, vec![Vec::new()], Vec::new()); + } + let mut paths = Vec::new(); let mut conflicts = Vec::new(); for patch in doc.diff(&before, &heads) { |
