Solved: RangeError: Maximum call stack size exceeded when using valueChanges.subscribe

RangeError: Maximum call stack size exceeded when using valueChanges.subscribe

public tokenAcquired: BehaviorSubject<any> = new BehaviorSubject<any>('');

//from where you want to trigger the subscription
this.appService.tokenAcquired.next(tokenStored.accessToken);


//where you are subscribing

this.appService.tokenAcquired.pipe(
    distinctUntilChanged()) // it will emit if value is different then last
    .subscribe((token) => {
      if (this.debugMode) {
        console.log("token acquired and calling getApps.");
      }
      this.getApps();
    })

Comments

Popular posts from this blog

Swagger for Azure functions: Undocumented TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body. Fixed.

Fixed: The required column was not present in the results of a 'FromSql' operation in asp.net core EF core

Severity Code Description Project File Line Suppression State Error Unable to resolve dependencies. 'Xamarin.Android.Support.Design 24.2.1' is not compatible with 'Xamarin.Forms 2.3.3.180 constraint: Xamarin.Android.Support.Design (= 23.3.0)'. 0