From a06c31553cacc90c88337905c69885103fc42977 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Fri, 24 Jul 2015 14:37:29 +0100 Subject: [PATCH] Handle `SubscriptionModule` being disabled Only fire `subscription.fetch()` if `subscriptionView` has been bound to an element. --- code_comments/htdocs/code-comments.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code_comments/htdocs/code-comments.js b/code_comments/htdocs/code-comments.js index 31fd099..2e2ccc4 100644 --- a/code_comments/htdocs/code-comments.js +++ b/code_comments/htdocs/code-comments.js @@ -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 ) ) );