Skip to content

Commit

Permalink
Handle SubscriptionModule being disabled
Browse files Browse the repository at this point in the history
Only fire `subscription.fetch()` if `subscriptionView` has been bound to
an element.
  • Loading branch information
schwuk committed Jul 24, 2015
1 parent ed17bec commit a06c315
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code_comments/htdocs/code-comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,5 +364,7 @@ var underscore = _.noConflict();

window.subscription = new Subscription();
window.subscriptionView = new SubscriptionView({model: subscription});
subscription.fetch();
if (subscriptionView.el) {
subscription.fetch();
}
}); }( jQuery.noConflict( true ) ) );

0 comments on commit a06c315

Please sign in to comment.