Hi guys,
this is probably a total newbie question:
Using es6 I just ran into a problem using collection-helpers:
This is the code I wrote in my .js file, which gives me an TypeError: _this.isPerson is not a function
error in the client:
Contacts.helpers({
isPerson: () => {
if (this.typeType==='Person') {
return true;
}
return false;
},
getPersonAsString: () => {
if (this.isPerson()) {
// ...
}
return '';
},
Basically Meteors es6-converter converts this
into _this
, which is not what I want.
What am I doing wrong??