From 1487545fd25cad46a5cc6f6a7c86e8edea74eb95 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 24 Mar 2014 16:21:50 -0400 Subject: [PATCH] fixing issue where cold loads were calling client-side event action:ajaxify.end with the wrong "url" --- public/src/app.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/src/app.js b/public/src/app.js index eec2bed3d7..34a5daf97e 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -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 });