Skip to content

fix(scroll): prevent 'cannot read from undefined' exception#4565

Merged
mlynch merged 1 commit intoionic-team:masterfrom
leobetosouza:master
Dec 6, 2015
Merged

fix(scroll): prevent 'cannot read from undefined' exception#4565
mlynch merged 1 commit intoionic-team:masterfrom
leobetosouza:master

Conversation

@leobetosouza
Copy link
Copy Markdown

Sometimes, I don't know why yet, scrollView is undefined and this line rises an Error. This commit fix this problem, but don't fix what makes the scrollView undefined.

@mhartington
Copy link
Copy Markdown
Contributor

Do you have an example of some markup where you'll get this error? Your change just adds a double check to make sure there is scroll view, but its not clear why that wouldn't be covered by the original

@leobetosouza
Copy link
Copy Markdown
Author

I'm sorry. But I don't have a specific snippet that generates this error.

I get it in Android 6.0 with chromium 44, using JS Scrolling at the startup. When I switched to native none of my test devices get the error.

I've tried to read the code on ionic.views.Scroll() but (at this moment) understand it is beyond my capabilities.

@igor-slotin
Copy link
Copy Markdown

+1
I have same issue, and this pull-request fixed it
It happened if data load in controller longer than rendering template

@leobetosouza
Copy link
Copy Markdown
Author

@igor-slotin @audotto @iltaen @bambriy @GulinSS do you have some code example to share with us?

mlynch added a commit that referenced this pull request Dec 6, 2015
fix(scroll): prevent 'cannot read from undefined' exception
@mlynch mlynch merged commit 5b6e4d6 into ionic-team:master Dec 6, 2015
@mlynch
Copy link
Copy Markdown
Contributor

mlynch commented Dec 6, 2015

Thanks, seems like a harmless check to add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants