Skip to content

Underscores in property name prevents from getting the value #38

@matthieu-fesselier

Description

@matthieu-fesselier

As you explain in the documentation, the semi-colon can be substituted by the underscores in property names.

In my example, I have a property name containing an underscore, and I get undefined when I try to fetch its value. Is it related?

const base_context = {
  '@vocab': 'http://happy-dev.fr/owl/#',
  rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
  rdfs: 'http://www.w3.org/2000/01/rdf-schema#',
  ldp: 'http://www.w3.org/ns/ldp#',
  foaf: 'http://xmlns.com/foaf/0.1/',
  name: 'rdfs:label',
  acl: 'http://www.w3.org/ns/auth/acl#',
  permissions: 'acl:accessControl',
  mode: 'acl:mode',
};

await solid.data.context.extend(base_context);
const resource = solid.data['https://api.coopstarter.happy-dev.fr/resources/1/'];
console.log(`${await resource.publication_year}`); // Prints undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions