derbyjs / racer

Realtime model synchronization engine for Node.js
1.18k stars 117 forks source link

query.ref can hang the browser #233

Closed droganov closed 3 months ago

droganov commented 9 years ago

This code would hang the browser (tested in chrome and firefox)

q = model.at "some.path"
q.ref "_page.path"

Expected behavior is a working reference or error, not enternal loop.

Workaround

model.ref "path", "newpath"

Situation:

# we stack some queries
queries = [
   model.ref "collection", {}
   model.at "some.path"
]
# subscribe
model.subscribe "queries"

# now we ned to ref them and query.ref works only for queries