Skip to content

Commit

Permalink
Do not assume response.body exists. Isssue 506
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Berners-Lee committed Jun 25, 2021
1 parent a1d8a36 commit 57901ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1572,8 +1572,8 @@ export default class Fetcher implements CallbackifyInterface {
if (response.ok) {
if (method === 'PUT' || method === 'PATCH' || method === 'POST' || method === 'DELETE') {
fetcher.invalidateCache (uri)
}
if (response.body) {
} // response.body with Chrome can't be relied on
if (response.text) { // Was: response.body https://github.com/linkeddata/rdflib.js/issues/506
response.text().then(data => {
response.responseText = data
resolve(response)
Expand Down

0 comments on commit 57901ed

Please sign in to comment.