mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
make getCurrentTemplate always return string
This commit is contained in:
parent
2aab2a49c8
commit
08a4b1f785
2 changed files with 9 additions and 1 deletions
|
@ -3,8 +3,15 @@ cl = function(something){
|
|||
};
|
||||
|
||||
getCurrentTemplate = function() {
|
||||
return Router.current().lookupTemplate();
|
||||
var template = Router.current().lookupTemplate();
|
||||
// on postsDaily route, template is a function
|
||||
if (typeof template === "function") {
|
||||
return template();
|
||||
} else {
|
||||
return template;
|
||||
}
|
||||
};
|
||||
|
||||
t=function(message){
|
||||
var d=new Date();
|
||||
console.log("### "+message+" rendered at "+d.getHours()+":"+d.getMinutes()+":"+d.getSeconds());
|
||||
|
|
|
@ -8,6 +8,7 @@ var coreSubscriptions = new SubsManager({
|
|||
PostsDailyController = RouteController.extend({
|
||||
|
||||
template: function() {
|
||||
// use a function to make sure the template is evaluated *after* any template overrides
|
||||
return getTemplate('postsDaily');
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue