Compruebe si el artículo existe en LocalStorage JavaScript
//If the given key does not exist in the list associated with the object then this method must return null.
if (localStorage.getItem("infiniteScrollEnabled") === null) {
//...
}
loneWolf_sage