diff --git a/TODO.txt b/TODO.txt index ea038178..0e3c593f 100644 --- a/TODO.txt +++ b/TODO.txt @@ -345,9 +345,6 @@ we should support right-click to unselect the bubble (atlas/studio/skip) [auto select issue] when you commit changes on git, it's considered unchanged. we should send like the last git hash too, like prior to head, too. -[scripts only mode] -when in scripts only mode, try to avoid the entire tree where scripts dont exist to make syncing from the Roblox plugin faster. prune non-script leaves. - [yielding after sync] there is some process that is making disconnecting after a one-shot sync completes take FOREVER if the server is yielding (usually from the reconciler) - once the one-shot sync completes, it should not be waiting for additional things to come from the server. it just needs to kill the connection immediately. and go back to the main page. diff --git a/src/snapshot/tree.rs b/src/snapshot/tree.rs index 4666dad7..5626cce1 100644 --- a/src/snapshot/tree.rs +++ b/src/snapshot/tree.rs @@ -158,6 +158,10 @@ impl RojoTree { } pub fn remove(&mut self, id: Ref) { + if self.inner.get_by_ref(id).is_none() { + return; + } + let mut to_move = VecDeque::new(); to_move.push_back(id); @@ -468,7 +472,9 @@ impl RojoTree { /// Moves the Rojo metadata from the instance with the given ID from this /// tree into some loose maps. fn remove_metadata(&mut self, id: Ref) { - let metadata = self.metadata_map.remove(&id).unwrap(); + let Some(metadata) = self.metadata_map.remove(&id) else { + return; + }; if let Some(specified) = metadata.specified_id { self.specified_id_to_refs.remove(&specified, id);