Skip to content

Commit

Permalink
always return an array of payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
robrichard committed Mar 10, 2020
1 parent 5ca34fd commit 46bb5a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function fetchImpl(
});
} else {
return response.json().then(json => {
onNext(json);
onNext([json]);
onComplete();
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function xhrImpl(
patchResolver.handleChunk(chunk);
index = xhr.responseText.length;
} else if (this.readyState === this.DONE && !isDeferred) {
onNext(JSON.parse(xhr.response));
onNext([JSON.parse(xhr.response)]);
onComplete();
}
}
Expand Down

0 comments on commit 46bb5a3

Please sign in to comment.