🐛 fix getPreviousPageId (#25131)
🐛 fix getPreviousPageId (#25131)

* fix getPreviousPageId

* s/indexOf/lastIndexOf

* renaming

ampproject/amphtml,voyagegroup/amphtml,rsimha-amp/amphtml,sharethrough/amphtml,alanorozco/amphtml,cory-work/amphtml,nexxtv/amphtml,jmadler/amphtml,ampproject/amphtml,adup-tech/amphtml,tlong2/amphtml,prateekbh/amphtml,zhouyx/amphtml,ampproject/amphtml,cory-work/amphtml,prateekbh/amphtml,prateekbh/amphtml,honeybadgerdontcare/amphtml,Gregable/amphtml,danielrozenberg/amphtml,danielrozenberg/amphtml,media-net/amphtml,Gregable/amphtml,alanorozco/amphtml,lannka/amphtml,yandex-pcode/amphtml,tlong2/amphtml,adup-tech/amphtml,tlong2/amphtml,tlong2/amphtml,jpettitt/amphtml,src-code/amphtml,adup-tech/amphtml,nexxtv/amphtml,alanorozco/amphtml,jpettitt/amphtml,jridgewell/amphtml,sharethrough/amphtml,mhc-gh/amphtml,jmadler/amphtml,jpettitt/amphtml,zhangsu/amphtml,Gregable/amphtml,cory-work/amphtml,ampproject/amphtml,tlong2/amphtml,nexxtv/amphtml,cory-work/amphtml,Gregable/amphtml,dotandads/amphtml,mhc-gh/amphtml,src-code/amphtml,lannka/amphtml,ampproject/amphtml,adup-tech/amphtml,jridgewell/amphtml,zhouyx/amphtml,smartadserver/amphtml,sharethrough/amphtml,Gregable/amphtml,rsimha-amp/amphtml,jpettitt/amphtml,mhc-gh/amphtml,jridgewell/amphtml,smartadserver/amphtml,media-net/amphtml,ampproject/amphtml,yandex-pcode/amphtml,prateekbh/amphtml,danielrozenberg/amphtml,zhouyx/amphtml,honeybadgerdontcare/amphtml,danielrozenberg/amphtml,alanorozco/amphtml,src-code/amphtml,taboola/amphtml,jridgewell/amphtml,voyagegroup/amphtml,mhc-gh/amphtml,erwinmombay/amphtml,sharethrough/amphtml,erwinmombay/amphtml,nexxtv/amphtml,voyagegroup/amphtml,dotandads/amphtml,rsimha-amp/amphtml,alanorozco/amphtml,cory-work/amphtml,jridgewell/amphtml,mhc-gh/amphtml,taboola/amphtml,voyagegroup/amphtml,danielrozenberg/amphtml,nexxtv/amphtml,cory-work/amphtml,ampproject/amphtml,sharethrough/amphtml,prateekbh/amphtml,ampproject/amphtml,honeybadgerdontcare/amphtml,media-net/amphtml,jmadler/amphtml,rsimha-amp/amphtml,rsimha-amp/amphtml,honeybadgerdontcare/amphtml,media-net/amphtml,nexxtv/amphtml,smartadserver/amphtml,rsimha-amp/amphtml,smartadserver/amphtml,smartadserver/amphtml,tlong2/amphtml,src-code/amphtml,honeybadgerdontcare/amphtml,prateekbh/amphtml,jmadler/amphtml,erwinmombay/amphtml,zhouyx/amphtml,danielrozenberg/amphtml,media-net/amphtml,danielrozenberg/amphtml,jpettitt/amphtml,taboola/amphtml,danielrozenberg/amphtml,voyagegroup/amphtml,voyagegroup/amphtml,honeybadgerdontcare/amphtml,rsimha-amp/amphtml,mhc-gh/amphtml,src-code/amphtml,Gregable/amphtml,yandex-pcode/amphtml,alanorozco/amphtml,dotandads/amphtml,zhouyx/amphtml,adup-tech/amphtml,lannka/amphtml,alanorozco/amphtml,zhouyx/amphtml,sharethrough/amphtml,honeybadgerdontcare/amphtml,dotandads/amphtml,jpettitt/amphtml,media-net/amphtml,media-net/amphtml,Gregable/amphtml,dotandads/amphtml,alanorozco/amphtml,erwinmombay/amphtml,nexxtv/amphtml,media-net/amphtml,lannka/amphtml,voyagegroup/amphtml,zhangsu/amphtml,zhangsu/amphtml,jmadler/amphtml,lannka/amphtml,taboola/amphtml,Gregable/amphtml,yandex-pcode/amphtml,zhangsu/amphtml,erwinmombay/amphtml,yandex-pcode/amphtml,lannka/amphtml,zhouyx/amphtml,adup-tech/amphtml,dotandads/amphtml,yandex-pcode/amphtml,jpettitt/amphtml,lannka/amphtml,yandex-pcode/amphtml,erwinmombay/amphtml,zhangsu/amphtml,src-code/amphtml,taboola/amphtml,prateekbh/amphtml,smartadserver/amphtml,jmadler/amphtml,zhangsu/amphtml,cory-work/amphtml,taboola/amphtml,jpettitt/amphtml,taboola/amphtml,jridgewell/amphtml,mhc-gh/amphtml,jridgewell/amphtml,mhc-gh/amphtml