localStorage usage is buggy
dsanders11 opened this issue · comments
Cool site. Seems the usage of localStorage is buggy though. In particular, in this line:
codebytere.github.io/js/shell.js
Line 42 in 3d5854b
localStorage.inHistory will always evaluate to be true. That's because everything put into localStorage is coerced to a string:
So this line:
codebytere.github.io/js/shell.js
Line 12 in 3d5854b
is actually setting inHistory to the string "false", and Boolean("false") === true.
Doesn't look like your usage of localStorage persists between page loads (everything resets) so there's no real need to use it.
oh TIL! i wrote this thing a while ago so it seems it's time for some updates 😆
i'll try to get to this at a Soon Time™️