Use only one way to go back

This commit is contained in:
Dmitry Lyzo 2021-09-06 16:47:46 +03:00
parent 04c4e03ac1
commit 985a7fb670

View file

@ -87,7 +87,7 @@ import '../../assets/css/scrollstyles.scss';
if (!self.closedByBack && isHistoryEnabled(dlg)) { if (!self.closedByBack && isHistoryEnabled(dlg)) {
const state = window.history.state || {}; const state = window.history.state || {};
if (state.dialogId === hash) { if (state.dialogId === hash) {
window.history.back(); appRouter.back();
} }
} }
@ -213,7 +213,7 @@ import '../../assets/css/scrollstyles.scss';
export function close(dlg) { export function close(dlg) {
if (isOpened(dlg)) { if (isOpened(dlg)) {
if (isHistoryEnabled(dlg)) { if (isHistoryEnabled(dlg)) {
window.history.back(); appRouter.back();
} else { } else {
closeDialog(dlg); closeDialog(dlg);
} }