Skip to content

Commit

Permalink
RJS-2809: Realm Web: Fix async iterator returned from watch (#6688)
Browse files Browse the repository at this point in the history
* Fixed asyncIteratorFromResponseBody to apply our polyfill unconditionally

* Adding a note to the changelog
  • Loading branch information
kraenhansen authored May 30, 2024
1 parent 87fbe68 commit 81ba4a2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions packages/realm-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
### Fixed
* Fixed an endless loop of requests that would happen if linking credentials failed due to an authentication failure. ([#6588](https://github.com/realm/realm-js/pull/6588), since v0.6.0)
* Logging in with `Credentials.anonymous()` credentials will now reuse any existing anonymous user which is already authenticated with the app. This aligns with the behaviour of the `realm` package and will result in less users being created. Use `Credentials.anonymous(false)` to disable this behaviour and achieve the old behaviour of creating new anonymous users on every login. ([#6592](https://github.com/realm/realm-js/pull/6592))
* Fixed crash in Chrome from calling `stream.return()` on a watch stream. (PR [#6688](https://github.com/realm/realm-js/pull/6688))

### Internal
* The base URL used to communicate with the Atlas App Services was changed from "https://realm.mongodb.com" to "https://services.cloud.mongodb.com". ([#6591](https://github.com/realm/realm-js/pull/6591))
Expand Down
2 changes: 0 additions & 2 deletions packages/realm-web/src/Fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ type SimpleObject = Record<string, unknown>;
function asyncIteratorFromResponseBody({ body }: Response): AsyncIterable<Uint8Array> {
if (typeof body !== "object" || body === null) {
throw new Error("Expected a non-null object");
} else if (Symbol.asyncIterator in body) {
return body as AsyncIterable<Uint8Array>;
} else if ("getReader" in body) {
return {
[Symbol.asyncIterator]() {
Expand Down

0 comments on commit 81ba4a2

Please sign in to comment.