The async generator example in `from` crashes the browser.
dpurp-db opened this issue · 1 comments
dpurp-db commented
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 commented
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.