Merge remote-tracking branch 'origin/master'
authorGregg Kellogg <gregg@kellogg-assoc.com>
Mon, 30 Apr 2012 19:14:07 -0700
changeset 606 d02c8fb8e183
parent 604 a5f3660b395e (current diff)
parent 605 270e795494f9 (diff)
child 607 d55646dd59f1
Merge remote-tracking branch 'origin/master'
--- a/playground/jsonld.js	Mon Apr 30 19:13:43 2012 -0700
+++ b/playground/jsonld.js	Mon Apr 30 19:14:07 2012 -0700
@@ -1544,7 +1544,7 @@
  * @param callback(err, output) called once the operation completes.
  */
 Processor.prototype.fromRDF = function(statements, options, callback) {
-  // prepare graph map (maps graph name => subjects, lists, etc)
+  // prepare graph map (maps graph name => subjects, lists)
   var defaultGraph = {subjects: {}, listMap: {}};
   var graphs = {'': defaultGraph};
 
@@ -1597,28 +1597,25 @@
       continue;
     }
 
-    // prepare to assign next JSON-LD value
-    var value;
-
     // if graph is not the default graph
     if(name !== '') {
       // add graph subject to default graph as needed
       if(!(name in defaultGraph.subjects)) {
-        value = defaultGraph.subjects[name] = {'@id': name};
+        defaultGraph.subjects[name] = {'@id': name};
       }
       else {
-        value = defaultGraph.subjects[name];
+        defaultGraph.subjects[name];
       }
     }
 
     // add subject to graph as needed
     var subjects = graph.subjects;
     if(!(s in subjects)) {
-      value = subjects[s] = {'@id': s};
+      var value = subjects[s] = {'@id': s};
     }
     // use existing subject value
     else {
-      value = subjects[s];
+      var value = subjects[s];
     }
 
     // convert to @type unless options indicate to treat rdf:type as property