Infininte scroll not working after disabled then enable again

I am using ionic 5 and i am using ion-refresher and ion-infinite-scroll in one page.
when i tried to scroll new set of document is showing for the first time.But after i use the refresher infinite scroll is not working.i enabled it back after refresh

// calling api here after success;
// this is based on condition ( if array.length reaches the total number of pages)
      ithis.infiniteScroll.disabled = true;

  this.infiniteScroll.disabled = false;
// calling api again here

Please help

when i changed the limit. it worked