janeirodigital / sai-js

Typescript library for Solid Application Interoperability
https://sai.js.org/
MIT License
8 stars 7 forks source link

`this.fetch()` does not have a `.text` function #35

Closed laurensdeb closed 2 years ago

laurensdeb commented 2 years ago

Apparently something is going wrong in the fetch wrapper with respect to the .text() promise. When invoking the this.fetch at shape-tree.ts (line 12), the wrapped fetch used here does not have a text function defined.

@laurensdeb/authorization-agent-http: TypeError: (intermediate value).text is not a function
@laurensdeb/authorization-agent-http:     at ReadableShapeTree.bootstrap (/Users/laurens/Documents/universiteit/authorization-agent/packages/aa-interop/node_modules/@janeirodigital/interop-data-model/dist/cjs/readable/shape-tree.js:20:101)
...

This can be resolved by introducing an explicit assignment, in fetch.ts. Like so:

    rdfResponse.text = response.text;