Added in checks so that the entire thing isn't consumed.

This commit is contained in:
Adam Harrison 2021-06-27 13:27:20 -04:00
parent fd3f25608f
commit f899848631
1 changed files with 2 additions and 2 deletions

View File

@ -608,9 +608,9 @@ function Node:close_all_docviews()
else
self.a:close_all_docviews()
self.b:close_all_docviews()
if self.a:is_empty() then
if self.a:is_empty() and not self.a.is_primary_node then
self:consume(self.b)
elseif self.b:is_empty() then
elseif self.b:is_empty() and not self.b.is_primary_node then
self:consume(self.a)
end
end