Skip to content

Commit

Permalink
emit app 'ready' event BEFORE attaching
Browse files Browse the repository at this point in the history
  • Loading branch information
nateps committed Jun 23, 2014
1 parent f50aeb3 commit 472d344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 472d344

Please sign in to comment.