# Cannot read property 'scrollTo' of null (on uncached views)

**URL:** <https://forum.ionicframework.com/t/cannot-read-property-scrollto-of-null-on-uncached-views/31224>\
**Category:** ionic-v1\
**Created:** [August 26, 2015, 10:41am UTC](https://forum.ionicframework.com/t/cannot-read-property-scrollto-of-null-on-uncached-views/31224 "2015-08-26T10:41:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amaccann](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/amaccann/32/71933_2.png) [@amaccann](https://forum.ionicframework.com/u/amaccann)\
**Post date:** [August 26, 2015, 10:41am UTC](https://forum.ionicframework.com/t/cannot-read-property-scrollto-of-null-on-uncached-views/31224/1 "2015-08-26T10:41:37Z")

</div>

Apologies if this is an overlapping question, and I’ve seen this specific error logged during the RC releases of Ionic; however I still get this error both in the `1.0.1` and `1.1.0` public releases.

For me, this error is logging when transitioning between two _uncached_ Views;

```auto
Cannot read property 'scrollTo' of null
    at ionic-angular.js:7070
    at processQueue (angular.js:13300)
    at angular.js:13316
    at completeOutstandingRequest (angular.js:4940)
    at angular.js:5328

```

The error doesn’t occur if the offending Views are cached, but our application logic dictates that we don’t want to cache the Views (as we have an API that needs to be refreshed each time we return to these Views)

Tracing the error, it looks like the `$ionicScroll` instance (I’m guessing the uncached View being unloaded) is $destroyed before `$ionicScroll.scrollTop()` is executed, at which point the local `scrollView` variable is `null`.

Anyone have any thoughts on how to resolve this? I could rewire our app to execute our init() functionality for the cached Views on, but I’d rather get to the bottom of this bug!

---

<div class="post-metadata">

**Author:** ![rflea](https://avatars.discourse-cdn.com/v4/letter/r/87869e/32.png) [@rflea](https://forum.ionicframework.com/u/rflea)\
**Post date:** [August 26, 2015, 12:58pm UTC](https://forum.ionicframework.com/t/cannot-read-property-scrollto-of-null-on-uncached-views/31224/2 "2015-08-26T12:58:49Z")

</div>

Hi ,

Try this in your ion-headers

no-tap-scroll=“true”

---

<div class="post-metadata">

**Author:** ![amaccann](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/amaccann/32/71933_2.png) [@amaccann](https://forum.ionicframework.com/u/amaccann)\
**Post date:** [August 26, 2015, 2:04pm UTC](https://forum.ionicframework.com/t/cannot-read-property-scrollto-of-null-on-uncached-views/31224/3 "2015-08-26T14:04:03Z")

</div>

@rflea Cool; I put that in my `<ion-nav-bar>` and it fixed the issue. Thanks for the help 😄
