Skip to content

Commit

Permalink
Merge pull request #374 from jankapunkt/fix-blaze-remove-domrange
Browse files Browse the repository at this point in the history
Blaze.remove should destroy view before detaching
  • Loading branch information
StorytellerCZ authored May 18, 2022
2 parents 4ab041f + cfae2c4 commit 5f85a72
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 @@ -697,9 +697,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 5f85a72

Please sign in to comment.