Update to latest jsonld.js.
--- a/playground/jsonld.js Tue Jul 16 15:10:24 2013 -0400
+++ b/playground/jsonld.js Tue Jul 16 15:21:26 2013 -0400
@@ -292,12 +292,12 @@
remoteContext: {'@context': remoteDoc.contextUrl}
};
if('expandContext' in options) {
- if(typeof options.expandContext === 'object' &&
- '@context' in options.expandContext) {
- input.expandContext = _clone(options.expandContext);
+ var expandContext = _clone(options.expandContext);
+ if(typeof expandContext === 'object' && '@context' in expandContext) {
+ input.expandContext = expandContext;
}
else {
- input.expandContext = {'@context': options.expandContext};
+ input.expandContext = {'@context': expandContext};
}
}
_retrieveContextUrls(input, options, function(err, input) {
@@ -314,7 +314,7 @@
// process optional expandContext
if(input.expandContext) {
activeCtx = processor.processContext(
- activeCtx, input.expandContext, options);
+ activeCtx, input.expandContext['@context'], options);
}
// process remote context from HTTP Link Header