Skip to content

Commit

Permalink
fix: don't duplicate path in URL to post on subdirectory installs.
Browse files Browse the repository at this point in the history
  • Loading branch information
askvortsov1 committed Mar 19, 2022
1 parent e95f7f4 commit 463af9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion framework/core/js/src/forum/components/PostMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export default class PostMeta extends Component {
* @returns {string}
*/
getPermalink(post) {
return app.forum.attribute('baseUrl') + app.route.post(post);
// URL.hostname transformation is necessary to avoid duplicating
// path in subdirectory installs.
return URL(app.forum.attribute('baseUrl')).hostname + app.route.post(post);
}
}

0 comments on commit 463af9a

Please sign in to comment.