Merge pull request #3812 from furinvader/bugs/fix-projects-sub-routes

Fix routing for projects sub routes
pull/3816/head
Alex Dik 9 years ago
commit 5f54488c1d
  1. 2
      frontend/app/routing.js
  2. 2
      frontend/tests/unit/tests/work_packages/routing-test.js

@ -229,7 +229,7 @@ angular.module('openproject')
});
$rootScope.$on('$stateChangeStart', function(event, toState, toParams){
if (toParams.projects === '' && toParams.projectPath) {
if (!toParams.projects && toParams.projectPath) {
toParams.projects = 'projects';
$state.go(toState, toParams);
}

@ -46,7 +46,7 @@ describe('Routing', function () {
beforeEach(function () {
toState = { name: 'work-packages.list' };
toParams = { projectPath: 'my_project', projects: '' };
toParams = { projectPath: 'my_project', projects: null };
});
it('sets the projects path segment to "projects" ', function () {

Loading…
Cancel
Save