ngankhanh98 / coursebox-angular

Coursebox webapp using angular
https://ngankhanh98.github.io/coursebox-angular/
MIT License
0 stars 2 forks source link

🐛 Maximum call stack size exceeded #5

Open ngankhanh98 opened 3 years ago

ngankhanh98 commented 3 years ago

Issue type

I'm submitting a ... (check one with "x")

Issue description

Current behavior: Infinite loop update state with Observerable.subscribe() image image

Related code:

// auth.service.ts
this.user$.subscribe((user) => {
  const resetPwdToken: Partial<Auth> = {
    resetPwdToken: res['resetPwdToken'],
  };
  this.UPDATE_STATE(user.userId, resetPwdToken);
});