Single operator returns undefined #6798
-
Greetings, Here is the code that I wrote: const source = of(
{ name: 'Dusan' },
{ name: 'Jovana' },
{ name: 'Jovan' },
{ name: 'Aleksandar' }
);
source.pipe(single((person) => person.name.startsWith('N'))).subscribe({
next: (value) => {
console.log({value});
},
error: (err) => {
console.log({err});
},
}); My question is, is it a bug or just an error in the documentation? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
What version of rxjs are you using? 🤔 I get the |
Beta Was this translation helpful? Give feedback.
-
My bad. I loaded an old project with rxjs 6.6 and I didn't check the version, so it didn`t work. Sorry for taking your time. 😅 |
Beta Was this translation helpful? Give feedback.
What version of rxjs are you using? 🤔
I get the
NotFoundError
on version 7.5.2. Could you please share a codesandbox/stackblitz that reproduces the issue?