Skip to content

Commit 46bb5a3

Browse files
committed
always return an array of payloads
1 parent 5ca34fd commit 46bb5a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/fetch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function fetchImpl(
4141
});
4242
} else {
4343
return response.json().then(json => {
44-
onNext(json);
44+
onNext([json]);
4545
onComplete();
4646
});
4747
}

src/xhr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function xhrImpl(
4141
patchResolver.handleChunk(chunk);
4242
index = xhr.responseText.length;
4343
} else if (this.readyState === this.DONE && !isDeferred) {
44-
onNext(JSON.parse(xhr.response));
44+
onNext([JSON.parse(xhr.response)]);
4545
onComplete();
4646
}
4747
}

0 commit comments

Comments
 (0)