79367685

Date: 2025-01-18 17:54:41
Score: 0.5
Natty:
Report link

I haven't usex rxjs, so this may not be right, but I'm going to assume that the .subscribe() function sets a callback for some time in the future, so the console.log(this.total) runs before it's actually updated from the subscription thing.

Are you sure you want to be subscribing in a callback, and not during the class creation?

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: whiterook6