Permalink
Browse files

only allow force inside _removeView if the view contains a parent

  • Loading branch information...
1 parent df8d0a5 commit e90f86ff40e36a679ffdcd2f1bc7b1a7ce61ee5e @tbranyen committed Sep 2, 2012
Showing with 3 additions and 1 deletion.
  1. +2 −0 backbone.layoutmanager.js
  2. +1 −1 dist/backbone.layoutmanager.min.js
@@ -696,6 +696,8 @@ var LayoutManager = Backbone.View.extend({
var manager = view.__manager__;
// Test for keep.
var keep = _.isBoolean(view.keep) ? view.keep : view.options.keep;
+ // Only allow force if View contains a parent.
+ force = force && manager.parent;
// Only remove views that do not have `keep` attribute set, unless the
// force flag is set.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit e90f86f

Please sign in to comment.