4👍
✅
I think you need a fallback in case the localStorage is empty :
{
el: '.row',
data:{
cap:undefined,
ti:undefined,
forLS:JSON.parse(localStorage.getItem("allData") || '{ "items":[] }'),
count:JSON.parse(localStorage.getItem("count") || '-1' )
}
Actually here is a working fork of your fiddle
Source:stackexchange.com