Scroll to top throwing unexpected error

TypeError: Cannot read property ‘timeStamp’ of null
at InfiniteScroll._onScroll (infinite-scroll.js:251)
at SafeSubscriber.schedulerFn [as _next] (core.es5.js:3863)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:238)
at SafeSubscriber.next (Subscriber.js:185)
at Subscriber._next (Subscriber.js:125)
at Subscriber.next (Subscriber.js:89)
at EventEmitterProxy.Subject.next (Subject.js:55)
at EventEmitterProxy.EventEmitter.emit (core.es5.js:3837)
at ScrollView.scroll.onScroll (content.js:412)
at ScrollView.setScrolling (scroll-view.js:71)

What code are you executing?
Also post your ionic info output please.

@ionic/cli-plugin-cordova : 1.6.1
@ionic/cli-plugin-ionic-angular : 1.4.1
@ionic/cli-utils : 1.7.0
ionic (Ionic CLI) : 3.7.0

global packages:

Cordova CLI : 7.0.1

local packages:

@ionic/app-scripts : 1.3.12
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.5.0

System:

Android SDK Tools : 25.2.5
Node              : v6.10.3
OS                : Windows 10
npm               : 3.10.10

html

  <ion-segment class="segment-content" [(ngModel)]="segment" (ionChange)="segmentChanged(segment,$event)" >
        <ion-segment-button value="Hour" checked>
          Hour
        </ion-segment-button>
        <ion-segment-button value="Day">
          Day
        </ion-segment-button>
        <ion-segment-button value="Week">
          Week
        </ion-segment-button>
      </ion-segment>

ts::

segmentChanged(event) {
    this.selectedTitle = event;
    // this.content.scrollToTop();
    this.sortArray(this.selectedTitle,this.bitcoinData);
      this.content.scrollToTop( ); // this one throwing error

     //

  }

Related: InfiniteScroll bug or problem
(Ahh, you already posted there…)

Here is a Github issue about this:


Add your +1

There might also be a solution.