export function runBlock($log, $state, $trace, $transitions) {
	'ngInject';

	// Enable logging of state transition
	$trace.enable('TRANSITION');

	// Add any logic for handling errors from state transitions
	$state.defaultErrorHandler(function() {
		// console.error('error:', error);
	});

	// Test when application is changing to 'app.start' route
	// to determine if a websocket connected has already been opened
	// so we can re-route the user back to the 'game'
	$transitions.onEnter({ to: 'app.start' }, (trans) => {
		let websocket = trans.injector().get('websocket');

		if (websocket.$ws) {
			let status = websocket.getStatus();

			if (status === websocket.STATUS.OPEN) {
				$state.go('app.game');
			}
		}
	});
}

export function runBlock($log, $state, $trace) {
	'ngInject';

	// Enable logging of state transition
	$trace.enable('TRANSITION');

	// Add any logic for handling errors from state transitions
	$state.defaultErrorHandler(function() {
		// console.error('error:', error);
	});
}

--- 
+++ 
@@ -1,4 +1,4 @@
-export function runBlock($log, $state, $trace) {
+export function runBlock($log, $state, $trace, $transitions) {
 	'ngInject';
 
 	// Enable logging of state transition
@@ -8,4 +8,19 @@
 	$state.defaultErrorHandler(function() {
 		// console.error('error:', error);
 	});
+
+	// Test when application is changing to 'app.start' route
+	// to determine if a websocket connected has already been opened
+	// so we can re-route the user back to the 'game'
+	$transitions.onEnter({ to: 'app.start' }, (trans) => {
+		let websocket = trans.injector().get('websocket');
+
+		if (websocket.$ws) {
+			let status = websocket.getStatus();
+
+			if (status === websocket.STATUS.OPEN) {
+				$state.go('app.game');
+			}
+		}
+	});
 }
Add transition to test for 'app.start' and redirect if websocket is OPEN
