Cannot read property 'subscribe' of undefined
See original GitHub issueHi there, it seems that in this part is an error.
_createClass(Sticky, [{ key: 'componentWillMount', value: function componentWillMount() { this.channel = this.context['sticky-channel']; this.channel.subscribe(this.updateContext); } }, {
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Angular "Cannot read property 'subscribe' of undefined"
The solution to this is that your getRecipes () method SHOULD NOT SUBSCRIBE. It should return either a Promise or an Observable.
Read more >Cannot read property 'subscribe' of undefined - ng-mocks
This issue means that something has been replaced with a mock object and returns a dummy result ( undefined ) instead of observable...
Read more >Spec file "Cannot read property of 'subscribe' of undefined"
Your problem is that your spySampleService.getMessage() returns undefined . Try spySampleService.getMessage.and.returnValue(of('message goes ...
Read more >cannot read properties of undefined angular testing - You.com
Problem is that you have not mocked the data for userService , hence it overrides the value you are setting. You should mock...
Read more >Cannot read property 'subscribe' of undefined when ... - GitHub
Hi,. I have a CI to upgrade dependencies and I'm having this error in my tests when trying to upgrade to react-redux to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Would it make sense to gracefully render without errors (perhaps a warning instead) if there is no parent
StickyContainer
? If I have a component that I want to be aSticky
when inside aStickyContainer
but also use it elsewhere in my app, knowing whether to render it as aSticky
or not might prove difficult, just for the sake of avoiding this rather cryptic error.no longer relevant as of 6.x