Skip to content

Commit

Permalink
Check if window.closed
Browse files Browse the repository at this point in the history
  • Loading branch information
martinheppner committed Sep 15, 2024
1 parent dbeb24a commit 56063d2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions src/views/Main/DetailReworked.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ const DetailReworked = (props) => {
};

const handleCloseTab = () => {
if (!!_city && _city !== "no-city" && !!idOne) {
window.close();
}
else {
window.close();
if (!window.closed) {
goToSearchPage();
}
};
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"@babel/traverse" "^7.24.8"
"@babel/types" "^7.24.8"

"@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.22.15", "@babel/helper-module-imports@^7.24.7":
"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.22.15", "@babel/helper-module-imports@^7.24.7":
version "7.24.7"
resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz"
integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==
Expand Down Expand Up @@ -3427,6 +3427,13 @@ babel-loader@^9.1.2:
find-cache-dir "^4.0.0"
schema-utils "^4.0.0"

babel-plugin-import@^1.13.8:
version "1.13.8"
resolved "https://registry.npmjs.org/babel-plugin-import/-/babel-plugin-import-1.13.8.tgz"
integrity sha512-36babpjra5m3gca44V6tSTomeBlPA7cHUynrE2WiQIm3rEGD9xy28MKsx5IdO45EbnpJY7Jrgd00C6Dwt/l/2Q==
dependencies:
"@babel/helper-module-imports" "^7.0.0"

babel-plugin-istanbul@^6.1.1:
version "6.1.1"
resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz"
Expand Down

0 comments on commit 56063d2

Please sign in to comment.