ionHistory loses data on refresh

I am using IonHistory just as this plunk in my app. The issue is during development when I refresh after writing some code. The back button stops working. Mainly due to ionHistory losing all the states it kept track off. Is there a way to retain IonHistory knowledge of states somewhere, so that it doesn’t lose the data