From 39aee228ff1bb700163166d90844e559641c7721 Mon Sep 17 00:00:00 2001 From: Bryan Spears Date: Wed, 22 Jul 2015 12:16:43 -0700 Subject: [PATCH] Attempted fix for #137 --- ampersand-view.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ampersand-view.js b/ampersand-view.js index 928ea82..7d3378a 100644 --- a/ampersand-view.js +++ b/ampersand-view.js @@ -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);