Closed jstcki closed 3 years ago
A cube that doesn't exist is never returned as null
null
const cube = await source.cube(iri);
Because this check is wrong: https://github.com/zazuko/rdf-cube-view-query/blob/e7cead4b8acafacc7d14b643b564112890c4e8c7/lib/Source.js#L53-L56
.out().length is always undefined therefore never 0. This should be .out().terms.length I think?
.out().length
undefined
0
.out().terms.length
Also, there may be cubes without observationConstraint (by accident?) … I wonder if those should also return null, as they're not very usable by this library.
A cube that doesn't exist is never returned as
null
Because this check is wrong: https://github.com/zazuko/rdf-cube-view-query/blob/e7cead4b8acafacc7d14b643b564112890c4e8c7/lib/Source.js#L53-L56
.out().length
is alwaysundefined
therefore never0
. This should be.out().terms.length
I think?