processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.11k stars 3.22k forks source link

fix clearStorage function to match expected behaviour #7006

Closed seralichtenhahn closed 1 month ago

seralichtenhahn commented 1 month ago

Resolves #7003

Changes: The clearStorage() function previously cleared the entire localStorage including the data set outside of p5.js. This is not the expected behaviour, the documentation states that only data set by the storeItem() will get cleared. This fix checks which data has been set with storeItem() and only removes the relevant data.

PR Checklist

welcome[bot] commented 1 month ago

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page!

limzykenneth commented 1 month ago

Looks good. Thanks!