mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 16:35:47 +01:00
fixing issue where cold loads were calling client-side event action:ajaxify.end with the wrong "url"
This commit is contained in:
@@ -651,6 +651,12 @@ var socket,
|
||||
var url = window.location.pathname.slice(1),
|
||||
tpl_url = ajaxify.getTemplateMapping(url);
|
||||
|
||||
url = url.replace(/\/$/, "");
|
||||
|
||||
if (url.indexOf(RELATIVE_PATH.slice(1)) !== -1) {
|
||||
url = url.slice(RELATIVE_PATH.length);
|
||||
}
|
||||
|
||||
$(window).trigger('action:ajaxify.start', {
|
||||
url: url
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user