aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/account
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-04-15 09:39:39 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-04-15 09:39:46 +0200
commitd464f2d6abcecd7cd2f5ca6f96d7b61b5b88444b (patch)
treeffe2ae875f3adf9cdef6df315ff4dc898ed8710a /server/sonar-web/src/main/js/apps/account
parent8a49482fc8b942ea75ddab4fee58d75a5c6eee9a (diff)
downloadsonarqube-d464f2d6abcecd7cd2f5ca6f96d7b61b5b88444b.tar.gz
sonarqube-d464f2d6abcecd7cd2f5ca6f96d7b61b5b88444b.zip
fix quality flaws
Diffstat (limited to 'server/sonar-web/src/main/js/apps/account')
-rw-r--r--server/sonar-web/src/main/js/apps/account/store/reducers.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/apps/account/store/reducers.js b/server/sonar-web/src/main/js/apps/account/store/reducers.js
index 813dcf15b97..e129a65f17f 100644
--- a/server/sonar-web/src/main/js/apps/account/store/reducers.js
+++ b/server/sonar-web/src/main/js/apps/account/store/reducers.js
@@ -20,9 +20,7 @@
import { RECEIVE_USER, ADD_PROJECT_NOTIFICATIONS, REMOVE_PROJECT_NOTIFICATIONS } from './actions';
function addProjectNotifications (state, project) {
- const found = state.find(notification => {
- return notification.project.internalId === project.internalId;
- });
+ const found = state.find(notification => notification.project.internalId === project.internalId);
if (found) {
return state;
@@ -42,9 +40,7 @@ function addProjectNotifications (state, project) {
}
function removeProjectNotifications (state, project) {
- return state.filter(notification => {
- return notification.project.internalId !== project.internalId;
- });
+ return state.filter(notification => notification.project.internalId !== project.internalId);
}
export const initialState = {
@@ -52,7 +48,7 @@ export const initialState = {
projectNotifications: window.sonarqube.notifications.project
};
-export default function (state = initialState, action) {
+export default function (state = initialState, action = {}) {
switch (action.type) {
case RECEIVE_USER:
return {