fix console error in settings

pull/146/head
Aevann 2023-05-05 05:13:18 +03:00
parent a4fceb7fe6
commit 998df31700
1 changed files with 12 additions and 10 deletions

View File

@ -607,17 +607,19 @@ function handleUploadProgress(e, upload_prog) {
if (width <= 768) {
expandImageModal.addEventListener('show.bs.modal', function () {
setTimeout(() => {
location.hash = "modal";
}, 400);
});
if (expandImageModal) {
expandImageModal.addEventListener('show.bs.modal', function () {
setTimeout(() => {
location.hash = "modal";
}, 400);
});
expandImageModal.addEventListener('hide.bs.modal', function () {
if(location.hash == "#modal") {
history.back();
}
});
expandImageModal.addEventListener('hide.bs.modal', function () {
if(location.hash == "#modal") {
history.back();
}
});
}
window.addEventListener('hashchange', function () {
if(location.hash != "#modal") {