Skip to content

Commit

Permalink
Attempted fix for AmpersandJS#137
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanspears committed Jul 22, 2015
1 parent 885e7c3 commit 39aee22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ampersand-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,11 @@ assign(View.prototype, {
}
};
function action() {
var el, subview;
var el, subview, waitFor;
// if not rendered or we can't find our element, stop here.
if (!this.el || !(el = this.query(opts.selector))) return;
if (!opts.waitFor || getPath(this, opts.waitFor)) {
waitFor = getPath(this, opts.waitFor);
if (!opts.waitFor || waitFor || (waitFor !== undefined && waitFor !== null)) {
subview = this[name] = opts.prepareView.call(this, el);
subview.render();
this.registerSubview(subview);
Expand Down

0 comments on commit 39aee22

Please sign in to comment.