Fixed observe callbacks

This commit is contained in:
Berislav 2018-09-24 12:01:22 -07:00
parent 3ed4bf589c
commit a04edaf59f

View file

@ -4,7 +4,7 @@ import {getNodeNamespace} from './createGraph';
function patchCursor(cursor, ns) {
const originalObserve = cursor.observe;
cursor.observe = function (callbacks) {
const newCallbacks = {};
const newCallbacks = Object.assign({}, callbacks);
if (callbacks.added) {
newCallbacks.added = doc => {
doc[`__query_path_${ns}`] = 1;