This Meteor server recursive method commonHint returns result undefined to the console even the finalRes has a value.
Any suggestion o
Any place you call commonHint you need to return the value of the call.
...
if (!hinters) {
hinters = [...lib.getCombinations(['arg1', 'arg2', 'arg3'], 2, 3)];
return this.commonHint(doc, shortMatches, hinters, results); // hinters is an array of length 3 with 2 elements each
}
...
if (hinters.length > 0) {
return this.commonHint(doc, shortMatches, hinters, results);