fixed "Reduce of empty array with no initial value" error
using splice to delete item from array
set items to localstorage after delete