Skip to content

Node.js based forum software built for the modern web

simplify returnPath logic via composer default

Barış Soner Uşaklıdda0480abfff
diff --git a/install/package.json b/install/package.json
index fc78146d4a..4281a0c71a 100644
--- a/install/package.json
+++ b/install/package.json
@@ -97,7 +97,7 @@
"multer": "2.0.2",
"nconf": "0.13.0",
"nodebb-plugin-2factor": "7.6.1",
- "nodebb-plugin-composer-default": "10.3.11",
+ "nodebb-plugin-composer-default": "10.3.12",
"nodebb-plugin-dbsearch": "6.3.5",
"nodebb-plugin-emoji": "6.0.5",
"nodebb-plugin-emoji-android": "4.1.1",
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js
index 324e11c9d7..cc8a56800b 100644
--- a/public/src/ajaxify.js
+++ b/public/src/ajaxify.js
@@ -573,16 +573,9 @@ $(document).ready(function () {
if (ev !== null && ev.state) {
const { returnPath } = ev.state;
if (ev.state.url === null && returnPath !== undefined) {
- const url = returnPath;
- const prependSlash = url && !url.startsWith('?') && !url.startsWith('#');
- const { relative_path } = config;
- const historyUrl = prependSlash ?
- (relative_path + '/' + url) :
- relative_path + (url || (relative_path ? '' : '/'));
-
window.history.replaceState({
url: returnPath,
- }, '', historyUrl);
+ }, '', returnPath);
} else if (ev.state.url !== undefined) {
ajaxify.handleTransientElements();
ajaxify.go(ev.state.url, function () {