Commit 1c933e5a authored by Robert Knight's avatar Robert Knight

Remove initial redirect when sidebar loads

Avoid redirecting to '/viewer' when the sidebar loads.

This redirect is unnecessary since the sidebar never changes its mode
once loaded and it caused the viewer embedded on a page to fail to load
when restoring a closed tab in Chrome.

This may also resolve issues where the user agent disallows the
'replaceState' call in certain situations (search prod-client reports on
Sentry for "replaceState")

Fixes #178
parent 26bd2791
...@@ -63,23 +63,19 @@ function configureRoutes($routeProvider) { ...@@ -63,23 +63,19 @@ function configureRoutes($routeProvider) {
reloadOnSearch: false, reloadOnSearch: false,
resolve: resolve, resolve: resolve,
}); });
$routeProvider.when('/viewer', $routeProvider.when('/stream',
{ {
controller: 'WidgetController', controller: 'StreamController',
template: VIEWER_TEMPLATE, template: VIEWER_TEMPLATE,
reloadOnSearch: false, reloadOnSearch: false,
resolve: resolve, resolve: resolve,
}); });
$routeProvider.when('/stream', $routeProvider.otherwise({
{ controller: 'WidgetController',
controller: 'StreamController',
template: VIEWER_TEMPLATE, template: VIEWER_TEMPLATE,
reloadOnSearch: false, reloadOnSearch: false,
resolve: resolve, resolve: resolve,
}); });
return $routeProvider.otherwise({
redirectTo: '/viewer',
});
} }
// @ngInject // @ngInject
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment