This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi,
Has anyone come across a problem where subscribing to network connection type causes a call stack error?
I have added my code within a platform.ready()
const disconnectSubscription = this.network.onDisconnect().subscribe(() => {
this.store.set('network', this.network.type);
});
const connectSubscription = this.network.onConnect().subscribe(() => {
setTimeout(() => {
this.store.set('network', this.network.type);
}, 3000);
});
I get the following error:
ERROR RangeError: Maximum call stack size exceeded - core.js:9110
at setupSubscription (fromEvent.js:26)
at setupSubscription (fromEvent.js:45)
at setupSubscription (fromEvent.js:45)
at setupSubscription (fromEvent.js:45)
at setupSubscription (fromEvent.js:45)
at setupSubscription (fromEvent.js:45)
at setupSubscription (fromEvent.js:45)
at setupSubscription (fromEvent.js:45)
at setupSubscription (fromEvent.js:45)
at setupSubscription (fromEvent.js:45)
Post Details
- Posted
- 5 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/ionic/comme...