diff --git a/packages/realm-web/CHANGELOG.md b/packages/realm-web/CHANGELOG.md index 470a665218..2033404dcb 100644 --- a/packages/realm-web/CHANGELOG.md +++ b/packages/realm-web/CHANGELOG.md @@ -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)) diff --git a/packages/realm-web/src/Fetcher.ts b/packages/realm-web/src/Fetcher.ts index b8cb79a5c4..beec8cd462 100644 --- a/packages/realm-web/src/Fetcher.ts +++ b/packages/realm-web/src/Fetcher.ts @@ -39,8 +39,6 @@ type SimpleObject = Record; function asyncIteratorFromResponseBody({ body }: Response): AsyncIterable { if (typeof body !== "object" || body === null) { throw new Error("Expected a non-null object"); - } else if (Symbol.asyncIterator in body) { - return body as AsyncIterable; } else if ("getReader" in body) { return { [Symbol.asyncIterator]() {