Deep inside the query mechanism, there's a function in index_key_interceptor.js, intercept( ), whose job is to find key records in common between different clauses of an AND query. It will get called with a pile of records that have previously matched previous conditions, and another pile of records from the current condition. Its job is to find the common records. If the former is null, it just sends the latter.
The bug happens when the former list is non-null and the latter - current - list is null. Then there's an error (can't find "filter" on undefined object).
Deep inside the query mechanism, there's a function in index_key_interceptor.js, intercept( ), whose job is to find key records in common between different clauses of an AND query. It will get called with a pile of records that have previously matched previous conditions, and another pile of records from the current condition. Its job is to find the common records. If the former is null, it just sends the latter.
The bug happens when the former list is non-null and the latter - current - list is null. Then there's an error (can't find "filter" on undefined object).
The fix is simple.
At line 3, insert
So the whole thing reads:
module.exports.intercept = function(a_keys, b_keys) { if (a_keys) { if ( !b_keys ) return null; return b_keys.filter(function(b_key) { return a_keys.some(function(a_key) { return a_key.k == b_key.k; }); });
} else { return b_keys; } };