0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

🐛 Dynamic Routing Beta: Fixed wrong template order for static routes

refs #9601
This commit is contained in:
kirrg001 2018-08-15 16:59:20 +02:00 committed by Katharina Irrgang
parent db3aa7d062
commit f49073a8ec

View file

@ -11,13 +11,14 @@ class StaticRoutesRouter extends ParentRouter {
super('StaticRoutesRouter');
this.route = {value: mainRoute};
this.templates = (object.templates || []).reverse();
this.templates = object.templates || [];
this.data = object.data || {query: {}, router: {}};
this.routerName = mainRoute === '/' ? 'index' : mainRoute.replace(/\//g, '');
debug(this.route.value, this.templates);
if (this.isChannel(object)) {
this.templates = this.templates.reverse();
this.rss = object.rss !== false;
this.filter = object.filter;
this.limit = object.limit;