Skip to content

Commit

Permalink
fix #1024 dispatched an action of resetCurrentMap to load metadatamod…
Browse files Browse the repository at this point in the history
…al (#1221)

* fix #1024 dipached an action of resetCurrentMap to load metadatamodal after save

* fix
  • Loading branch information
saidaipparla authored and mbarto committed Oct 27, 2016
1 parent 503c9b7 commit 5a12fa1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions web/client/actions/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ function saveAll(map, metadataMap, nameThumbnail, dataThumbnail, categoryThumbna
dispatch(resetUpdating(resourceIdMap));
dispatch(onDisplayMetadataEdit(false));
}
dispatch(resetCurrentMap());
};
}

Expand Down
4 changes: 0 additions & 4 deletions web/client/reducers/currentMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,13 @@ function currentMap(state = {}, action) {
case PERMISSIONS_LIST_LOADED: {
return assign({}, state, {permissionLoading: false});
}
/*
case RESET_CURRENT_MAP: {
// resetting all the keys of the currentMap state
let newCurrentMap = Object.keys(state).reduce(function(previous, current) {
previous[current] = null;
return previous;
}, {});
return assign({}, newCurrentMap);
}*/
case RESET_CURRENT_MAP: {
return {};
}
default:
return state;
Expand Down

0 comments on commit 5a12fa1

Please sign in to comment.