My App is running perfectly in debug mode but when I run it in production mode I get “Error: No such function: canAddMore”. Here is the JS code I have…
Template.fbRegister.helpers ({
jobCount : function() {
return Session.get("jobCount");
},
eduCount : function() {
return Session.get("eduCount");
},
moreThanOneJob : function() {
return Session.get('jobCount').length > 1
},
moreThanOneEdu : function() {
return Session.get('eduCount').length > 1
},
canAddMore : function(count) {
console.log(count)
return count.length <= 2
},
});
And here is the HTML code …
{{#if canAddMore jobCount}}<a class="normal-link add-job">+ Add another Job</a>{{/if}}
What am I doing wrong here?
Any help would be appreciated. Thanks.