Changeset - ffa3b81c6d95
[Not reviewed]
default
0 1 0
Drew Perttula - 8 years ago 2017-06-10 10:23:48
drewp@bigasterisk.com
some missing askedFor auditing
Ignore-this: 581b102bbdaef0dc715e61430d639e01
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
light9/web/graph.coffee
Show inline comments
 
@@ -287,12 +287,14 @@ class window.SyncedGraph
 
    out = []
 
    current = list
 
    while true
 
      if current == RDF + 'nil'
 
        break
 
        
 
      @_autoDeps.askedFor(current, null, null, null) # a little loose
 

	
 
      firsts = @graph.findByIRI(current, RDF + 'first', null)
 
      rests = @graph.findByIRI(current, RDF + 'rest', null)
 
      if firsts.length != 1
 
        throw new Error("list node #{current} has #{firsts.length} rdf:first edges")
 
      out.push(firsts[0].object)
 

	
 
@@ -318,11 +320,12 @@ class window.SyncedGraph
 
    throw new Error("can't make sequential uri with base #{base}")
 

	
 
  nextNumberedResource: (base) ->
 
    @nextNumberedResources(base, 1)[0]       
 

	
 
  contextsWithPattern: (s, p, o) ->
 
    @_autoDeps.askedFor(s, p, o, null)
 
    ctxs = []
 
    for q in @graph.find(s, p, o)
 
      ctxs.push(q.graph)
 
    return _.unique(ctxs)
 

	
0 comments (0 inline, 0 general)