Skip to content

Node.js based forum software built for the modern web

fixed /recent /popular /active /users/name

psychobunny19cfef9570f0
diff --git a/public/src/templates.js b/public/src/templates.js
index a5818e1649..0929f65c92 100644
--- a/public/src/templates.js
+++ b/public/src/templates.js
@@ -99,13 +99,18 @@
var api_url = (url === '' || url === '/') ? 'home' : url;
- var tpl_url = templates.get_custom_map(url);
- if (tpl_url == false && !templates[api_url]) {
- tpl_url = api_url.split('/')[0];
- } else {
- tpl_url = api_url;
+
+ var tpl_url = templates.get_custom_map(api_url);
+
+ if (tpl_url === false) {
+ if (!available_templates[api_url]) {
+ tpl_url = api_url.split('/')[0];
+ } else {
+ tpl_url = api_url;
+ }
}
+
var template_data = null;