semantic-ko
semantic-ko copied to clipboard
env undefined error on json-ld value "@graph"
When I run this: var store = new rdfstore.Store({}, function () { }); store.load('remote', 'somejsonld.js', function (success, results) {});
What happens is jsonld.toTriples in its callback calls Utils.lexicalFormTerm(p) (no second arg), and then that calls Utils.lexicalFormBaseUri(term, ns) (ns is undefined), which contains this line: uri = (env.base||"") + uri; // typeerror since undefined has no attribute 'base'
It seems like lexicalFormBaseUri should be able tolerate an omitted env, or toTriples should pass something like {}.
FYI, in my case the value of p was {token:"uri", value:"@graph"}.