Fix for empty tree.

This commit is contained in:
Herbert Wolverson 2024-07-09 20:42:51 -05:00
parent 1a04dd646c
commit 82d2734d3f

View File

@ -157,7 +157,9 @@ impl NetworkJson {
/// have been made to the clone, and the clone is then copied back /// have been made to the clone, and the clone is then copied back
/// into the main structure. /// into the main structure.
pub fn finish_update_cycle(&mut self, counting: NetworkJsonCounting) { pub fn finish_update_cycle(&mut self, counting: NetworkJsonCounting) {
self.nodes = counting.nodes; if !counting.nodes.is_empty() {
self.nodes = counting.nodes;
}
} }
} }