Skip to content

nil.usages is undefined when parsing RDF itself. #205

@flyon

Description

@flyon

When I parse the RDF ontology itself with jsonld.promises.fromRDF(nquads, {format: 'application/nquads'}) it causes an error on line 3237:

F:\wamp-new\www\dacore\modules\core\node_modules\jsonld\js\jsonld.js:3236
    for(var i = 0; i < nil.usages.length; ++i) {
                                 ^

TypeError: Cannot read property 'length' of undefined
    at Processor.fromRDF (F:\wamp-new\www\dacore\modules\core\node_modules\jsonld\js\jsonld.js:3236:34)
    at fromRDF (F:\wamp-new\www\dacore\modules\core\node_modules\jsonld\js\jsonld.js:908:23)
    at F:\wamp-new\www\dacore\modules\core\node_modules\jsonld\js\jsonld.js:903:7
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

This seems to be because RDF_NIL occurs in the graph (because the RDF ontolgy defines it) but is not used as an object anywhere in the RDF ontology.]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions