Skip to content

Commit

Permalink
fix: error condition
Browse files Browse the repository at this point in the history
  • Loading branch information
itswadesh committed Sep 23, 2024
1 parent 9297e8a commit 0df1742
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/+error.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ export let data
let q = ''
let showSidebar = false
console.log($page.status)
// Redirect to homepage in case of error, 404, 500. Good for SEO. e.g. URL = https://natox.litekart.in/auth/forgot-password/4985097192661
if ($page.status == 404 || ($page.status == 500 && browser)) {
if (($page.status == 404 || $page.status == 500) && browser) {
goto('/')
}
</script>
Expand Down

0 comments on commit 0df1742

Please sign in to comment.