toystars / node-elasticsearch-sync

ElasticSearch and MongoDB sync module for node
MIT License
17 stars 11 forks source link

Cannot read property 'transformFunction' of undefined #28

Open ricardolimaui opened 5 years ago

ricardolimaui commented 5 years ago

Hello, I am facing this problem and I am not understanding why. The actual code are in this state:

let transformFunction = (watcher, document, callBack) => {
  //document.name = document.firstName + ' ' + document.lastName;
  //console.log(document);
  callBack(document);
}
let componentsWatcher = {
  collectionName: 'components',
  index: 'meteor.components',
  type: 'components',
  transformFunction: transformFunction,
  fetchExistingDocuments: true,
  priority: 0
};

And it is giving me the currently error, which stop from synchronising. Any idea ? Thank you