mirror of
https://github.com/vale981/grapher
synced 2025-03-05 09:31:42 -05:00
Fixed observe callbacks
This commit is contained in:
parent
3ed4bf589c
commit
a04edaf59f
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue