From 520bfd7614fa4213e1b6e9111f017f1395e7caee Mon Sep 17 00:00:00 2001
From: Mathis Neumann <mathis@simpletechs.net>
Date: Sat, 9 Jul 2016 22:16:59 +0200
Subject: [PATCH] do not close socket connection when going to subroute

---
 app/routes/deployments/single.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/routes/deployments/single.js b/app/routes/deployments/single.js
index 341da11..bd83513 100644
--- a/app/routes/deployments/single.js
+++ b/app/routes/deployments/single.js
@@ -50,8 +50,11 @@ export default Ember.Route.extend({
         });
         this.transitionTo(url);
     },
-    willTransition() { // FIXME: do not disconnect for subpages!
-        this.get('changelogStream').disconnect();
+    willTransition(transition) {
+        // do not disconnect if transitioning to a child route (details)
+        if (transition.targetName.indexOf(this.get('routeName')) !== 0) {
+            this.get('changelogStream').disconnect();
+        }
     }
   }
 });
-- 
GitLab