From 472d3440c7ef29145afcfd77a3727be5c7c66f7f Mon Sep 17 00:00:00 2001 From: Nate Smith Date: Sun, 22 Jun 2014 23:42:17 -0700 Subject: [PATCH] emit app 'ready' event BEFORE attaching --- lib/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/App.js b/lib/App.js index d0f393c8b..97fb4220b 100644 --- a/lib/App.js +++ b/lib/App.js @@ -66,11 +66,11 @@ App.prototype._finishInit = function() { this.model.unbundle(data); var page = this.createPage(); page.params = this.model.get('$render.params'); + this.emit('ready', page); try { // Attach to the currently rendered DOM. This will fail if there is any // slight mismatch between the rendered HTML and the client-side render page.attach(); - this.emit('ready', page); } catch (err) { // Since an attachment failure is *fatal* and could happen as a result of a // browser extension like AdBlock, an invalid template, or a small bug in