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,13 +63,6 @@ function configureRoutes($routeProvider) {
reloadOnSearch: false,
resolve: resolve,
});
$routeProvider.when('/viewer',
{
controller: 'WidgetController',
template: VIEWER_TEMPLATE,
reloadOnSearch: false,
resolve: resolve,
});
$routeProvider.when('/stream',
{
controller: 'StreamController',
......@@ -77,8 +70,11 @@ function configureRoutes($routeProvider) {
reloadOnSearch: false,
resolve: resolve,
});
return $routeProvider.otherwise({
redirectTo: '/viewer',
$routeProvider.otherwise({
controller: 'WidgetController',
template: VIEWER_TEMPLATE,
reloadOnSearch: false,
resolve: resolve,
});
}
......
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