Skip to content

Commit

Permalink
Fix bug causing blank posts
Browse files Browse the repository at this point in the history
It would happen which clicking on a notification about a comment on a post, then closing the post. This wouldn't clear out the /comments part of the URL. So then clicking on the next post would create a weird URL with /comments stuck in the middle
  • Loading branch information
tibetsprague committed Jan 15, 2025
1 parent c637c23 commit 609b6e1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions apps/web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [5.11.4] - 2024-01-14

- Bug causing blank posts. It would happen which clicking on a notification about a comment on a post, then closing the post. This wouldn't clear out the /comments part of the URL. So then clicking on the next post would create a weird URL with /comments stuck in the middle

### Fixed

## [5.11.3] - 2024-01-12

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "web",
"description": "Hylo Frontend",
"version": "5.11.3",
"version": "5.11.4",
"private": true,
"license": "Apache-2.0",
"author": "Hylo <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/util/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export function addQuerystringToPath (path, querystringParams) {
}

export function removePostFromUrl (url) {
const matchForReplaceRegex = `/post/${POST_ID_MATCH}`
const matchForReplaceRegex = `/post/${POST_ID_MATCH}(/.*)?`
return url.replace(new RegExp(matchForReplaceRegex), '')
}

Expand Down

0 comments on commit 609b6e1

Please sign in to comment.