]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8451 fix problem with settings
authorStas Vilchik <vilchiks@gmail.com>
Tue, 24 Jan 2017 13:46:57 +0000 (14:46 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Tue, 24 Jan 2017 13:46:57 +0000 (14:46 +0100)
server/sonar-web/src/main/js/apps/settings/store/definitions/reducer.js

index eb788853ea4613e3c44b0550e8530ba11b1239d2..1584147902bfc36ae24ca434be4500d1dc6b66e4 100644 (file)
@@ -31,8 +31,7 @@ type Action = { type: string, definitions: Definition[] };
 
 const reducer = (state: State = {}, action: Action) => {
   if (action.type === RECEIVE_DEFINITIONS) {
-    const definitionsByKey = keyBy(action.definitions, 'key');
-    return { ...state, ...definitionsByKey };
+    return keyBy(action.definitions, 'key');
   }
 
   return state;