Photo index 0 not showing

I have try to put photo into array and call each photo I click to show the photo index.
But the 1st photo array 0 not showing until I swipe left or right then it will show.
Is there something wrong in my code ?

here my code

   var photos = [];
   for (var i = 0; i < arrSize; i++) {
      photos[i] = arrData;
   }
    var myPhotoBrowserDark = app.photoBrowser.create({
      photos,
      theme: 'dark'
    });
    $$('.pb').on('click', function () {
      var photoIndex = $$(this).attr("data-index");
      myPhotoBrowserDark.open(photoIndex);
    });

I just found out that index in tutorial also have the similar problem.
But , this happen when I closed and open it again then photos counting gone.

Found an issue with it in core, will be fixed in next update

:smile: Actually I’m using version 4

I updated to 5.2 but It’s still not working for my code.
Any suggestion ?

Nope, can’t see such issue anymore on latest v5. Make sure you are passing correct index there