-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Ionic-1.0.0-rc.0 - Cannot call method "contains" of undefined #3295
Comments
Hi guys, i think this issue is still there, though it's fixed for a different line to the reported. I'm having the same issue with this line
and as @revie mentioned, just need a small change to
not sure why was fixed for the other line as suggested and not for the reported one. |
Guys i also get the error. In our ionic version 1.0.0 uranium. change as brayancastrop suggests can fix the issue. |
Hi, This error happens sometimes in our app using Ionic 1.0.1. It happens at the line 23 of the minified version. I looked at it and I found 2 possible candidates: 1- Line 3179 of ionic.bundle.js version 1.1.0 if (ele.classList.contains('button')) { 2- Line 5046 of ionic.bundle.js version 1.1.0 var isModal = container.parentNode.classList.contains('modal'); Hope this helps! |
Thanks @dpaloucva. In addition to your two, it looks like there's another one that is just like your #2, but on line 7189 in ionic.bundle.js v1.1.0: var isModal = container.parentNode.classList.contains('modal'); |
Type: bug
Platform: android 4.0 webview
I'm getting a javascript error when testing some animation code on an Android 4.0.3 tablet, which says:
Uncaught TypeError: Cannot call method 'contains' of undefined at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:3162
which points to the following line in ionic.requestAnimationFrame():
if (ele.classList.contains('button')) {
Line needs to be changed to the following, to avoid the error:
if (ele.classList && ele.classList.contains('button')) {
Also recommend making the same changes to the classList checks a few lines before and a few lines after the line mentioned to avoid running into the error when checking for class entries of "item" or "pane" as well.
The text was updated successfully, but these errors were encountered: