Update to latest jsonld.js.
--- a/playground/jsonld.js Mon Apr 15 13:41:53 2013 -0400
+++ b/playground/jsonld.js Tue Apr 16 10:16:27 2013 -0400
@@ -4175,7 +4175,7 @@
}
// create new mapping
- var mapping = {};
+ var mapping = activeCtx.mappings[term] = {};
mapping.reverse = false;
if('@reverse' in value) {
@@ -4245,6 +4245,9 @@
}
}
+ // IRI mapping now defined
+ defined[term] = true;
+
if('@type' in value) {
var type = value['@type'];
if(!_isString(type)) {
@@ -4306,10 +4309,6 @@
'Invalid JSON-LD syntax; @context and @preserve cannot be aliased.',
'jsonld.SyntaxError');
}
-
- // define term mapping
- activeCtx.mappings[term] = mapping;
- defined[term] = true;
}
/**