Skip to content

Commit

Permalink
fix: keep the visualization name when re-saving after edit
Browse files Browse the repository at this point in the history
When clicking Save on a stored visualization, keep the same name and
avoid the default Untitled name be used instead.
  • Loading branch information
edoardo committed Sep 15, 2020
1 parent 5ecadd3 commit aca9a9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/app/src/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ export const tDoSaveVisualization = ({ name, description }, copy) => async (
}

visualization.name =
// name provided in the Save dialog
name ||
// existing name when saving the same modified visualization
visualization.name ||
// new visualization with no name provided in Save dialog
i18n.t('Untitled {{visualizationType}} visualization, {{date}}', {
visualizationType: getDisplayNameByVisType(visualization.type),
date: new Date().toLocaleDateString(undefined, {
Expand Down

0 comments on commit aca9a9c

Please sign in to comment.