Skip to content

Commit

Permalink
fix: Blaze.remove should destroy view before detaching
Browse files Browse the repository at this point in the history
  • Loading branch information
jankapunkt committed Apr 26, 2022
1 parent a8dab83 commit cfae2c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/blaze/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,11 @@ Blaze.remove = function (view) {
while (view) {
if (! view.isDestroyed) {
var range = view._domrange;
if (range.attached && ! range.parentRange)
range.detach();
range.destroy();

if (range.attached && ! range.parentRange) {
range.detach();
}
}

view = view._hasGeneratedParent && view.parentView;
Expand Down

0 comments on commit cfae2c4

Please sign in to comment.