diff --git a/frontend/app/routing.js b/frontend/app/routing.js index 0fee307e72..107af8ba37 100644 --- a/frontend/app/routing.js +++ b/frontend/app/routing.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); } diff --git a/frontend/tests/unit/tests/work_packages/routing-test.js b/frontend/tests/unit/tests/work_packages/routing-test.js index 32c3b1c6dd..d673176cc9 100644 --- a/frontend/tests/unit/tests/work_packages/routing-test.js +++ b/frontend/tests/unit/tests/work_packages/routing-test.js @@ -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 () {