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

The async generator example in from crashes the browser. #7377

Open
dpurp-db opened this issue Nov 17, 2023 · 1 comment
Open

The async generator example in from crashes the browser. #7377

dpurp-db opened this issue Nov 17, 2023 · 1 comment

Comments

@dpurp-db
Copy link

Describe the bug

Running the async generator example in Stackblitz (link) crashes the page in Chrome v119

https://rxjs.dev/api/index/function/from#examples

Expected behavior

Stackblitz logs the expected outcome:

// Logs:
// 3
// 6
// 12
// 24
// 48
// 96
// 192
// 384
// 768
// 1536

Reproduction code

import { from, take } from 'rxjs';

function* generateDoubles(seed) {
   let i = seed;
   while (true) {
     yield i;
     i = 2 * i; // double it
   }
}

const iterator = generateDoubles(3);
const result = from(iterator).pipe(take(10));

result.subscribe(x => console.log(x));

Reproduction URL

https://stackblitz.com/run?devtoolsheight=50&file=index.ts

Version

7.8.1

Environment

Chrome v119

Additional context

No response

@jakovljevic-mladen
Copy link
Member

Hi, I can't reproduce this issue. Is there a chance you could create a reproducible code and post a proper link that would work? Current link does not work. Also, pasting the provided code example to seems to Stackblitz works for me and it doesn't seem to freeze my browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants