angular2-busy
angular2-busy copied to clipboard
Maximum call stack size
Hey,
I run a pretty complex application and need to dynamically change the subscriptions inside busy. This works quite well sometimes and sometimes not.
Sometimes, I don't understand why, I receive a maximum call stack inside the equals method.
error_handler.js:53 RangeError: Maximum call stack size exceeded
at equals (util.js:70)
at equals (util.js:76)
at equals (util.js:76)
at equals (util.js:76)
at equals (util.js:76)
at equals (util.js:76)
at equals (util.js:76)
at equals (util.js:76)
at equals (util.js:76)
at equals (util.js:76)
Any ideas how to deal with it? :(
At some time subscriptions containing a reference to itself which can break the equals method.
This isn't happening with promises.
Using promises makes the whole a lot more stable, I would suggest to everyone.
Btw. is there a special reason why you copied the angular equals method to the lib?
I have the same problem!
@paria-tk use promises to get rid of it until theres a solution for observers, worked quite well for me! :)
@devyumao @cookiekiller I am using observables and I get Maximum call stack size exceeded error as I am calling another service call inside this.busy . Did anyone found workaround for this issue. I cannot changes to promises now as it will be a lot of code changes.
Another scenario getting call stack error:
on page load i will be loading data into several panels, I have service calls on ngOnit() one after the other, but this throwing error call stack maximum exceeded , if i remove "this.busy =" to other panels it just works fine, its only that before subscription complete of first panel load another is triggered and I am getting max call stack issue i guess.
How can I fix this ?
The same problem. Can not use Subscription as 'busy'.
I have the same problem. Is there going to be a fix for this?
I used FlatMap and forkjoin where ever it's needed and got rid of this issue in most of the cases.
@vijender1256 Can you provide small example? Thanks
Any new on this issue now, maybe a workaround ?