Update to latest jsonld.js.
authorDave Longley <dlongley@digitalbazaar.com>
Mon, 30 Apr 2012 16:30:55 -0400
changeset 600 dd52f1782d63
parent 599 682fd66c2118
child 601 a7bb95568774
Update to latest jsonld.js.
playground/jsonld.js
--- a/playground/jsonld.js	Mon Apr 30 14:36:19 2012 -0400
+++ b/playground/jsonld.js	Mon Apr 30 16:30:55 2012 -0400
@@ -4040,7 +4040,7 @@
     var s = {subject: {}, property: {}, object: {}};
 
     // get subject
-    if(_isUndefined(match[2])) {
+    if(!_isUndefined(match[1])) {
       s.subject.nominalValue = match[1];
       s.subject.interfaceName = 'IRI';
     }
@@ -4053,15 +4053,13 @@
     s.property = {nominalValue: match[3], interfaceName: 'IRI'};
 
     // get object
-    if(_isUndefined(match[6])) {
-      if(_isUndefined(match[5])) {
-        s.object.nominalValue = match[4];
-        s.object.interfaceName = 'IRI';
-      }
-      else {
-        s.object.nominalValue = match[5];
-        s.object.interfaceName = 'BlankNode';
-      }
+    if(!_isUndefined(match[4])) {
+      s.object.nominalValue = match[4];
+      s.object.interfaceName = 'IRI';
+    }
+    else if(!_isUndefined(match[5])) {
+      s.object.nominalValue = match[5];
+      s.object.interfaceName = 'BlankNode';
     }
     else {
       s.object.nominalValue = match[6];