Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RJS-2809: Realm Web: Fix async iterator returned from watch #6688

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading