show "You have unsaved changes" message also in save mode

This commit is contained in:
Martin Raifer
2017-01-22 19:28:39 +01:00
parent 3246ca176f
commit ac8a52980b
+3 -2
View File
@@ -131,8 +131,9 @@ export function coreContext() {
};
context.save = function() {
if (inIntro || (mode && mode.id === 'save') || d3.select('.modal').size()) return;
history.save();
if (inIntro || d3.select('.modal').size()) return;
if (!(mode && mode.id === 'save'))
history.save();
if (history.hasChanges()) return t('save.unsaved_changes');
};