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

Cannot read property 'isStopped' of undefined #12

Open
httphttp opened this issue Jan 31, 2019 · 0 comments
Open

Cannot read property 'isStopped' of undefined #12

httphttp opened this issue Jan 31, 2019 · 0 comments

Comments

@httphttp
Copy link

不是本书的问题, 但是想请教一下作者

const source$ = Observable.create(({ next }) => {
  next(1)
  next(2)
  next(3)
})

source$.subscribe(console.log)

// 会报错误: TypeError: Cannot read property 'isStopped' of undefined
const source$ = Observable.create((observer) => {
  observer.next(1)
  observer.next(2)
  observer.next(3)
})

source$.subscribe(console.log)
// 运行正常: 1 2 3

不知作者知道内部到底是什么原因吗

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

1 participant