This is a rather easy one. I was adding my filtering values in my local storage and had to check if a "library" key existed.

if(localStorage.getItem('library') !== null) {
  // do stuff

 

 

Saved you some valuable time?

Buy me a drink 🍺