fixed: trash initialization
This commit is contained in:
parent
5fe950ce8c
commit
fb9af373b3
2
main.js
2
main.js
|
@ -2332,7 +2332,7 @@ function rename(newname)
|
||||||
|
|
||||||
function deletenote(note)
|
function deletenote(note)
|
||||||
{
|
{
|
||||||
var trash = JSON.parse(window.localStorage.getItem("trash")) || [];
|
var trash = JSON.parse(window.localStorage.getItem("trash") || "[]");
|
||||||
trash.push(note);
|
trash.push(note);
|
||||||
window.localStorage.setItem("trash", JSON.stringify(trash));
|
window.localStorage.setItem("trash", JSON.stringify(trash));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue