ReactiveX / learnrx

A series of interactive exercises for learning Microsoft's Reactive Extensions Library for Javascript.
1.4k stars 292 forks source link

Fix TypeError on the console from Exercise 29 #178

Closed seanpoulter closed 5 years ago

seanpoulter commented 5 years ago

Proposed changes

  1. Observable.prototype.forEach returns a Promise. This causes the original example code to throw a TypeError when subscription.dispose is not found. Switching from forEach to do solves this issue.
  2. As of RxJS v5, subscription dispose is now unsubscribe.

This PR will close #160.

Demo There is no error on the console. 🎉 reactivex - learnrx - fixes 160

CC: @morenoh149