mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
fix: check for null item when reindexing backup
This commit is contained in:
@@ -183,6 +183,10 @@ function filterData(data) {
|
|||||||
function reindex(data) {
|
function reindex(data) {
|
||||||
for (let key in data) {
|
for (let key in data) {
|
||||||
const item = data[key];
|
const item = data[key];
|
||||||
|
if (!item) {
|
||||||
|
delete data[key];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case "notebook":
|
case "notebook":
|
||||||
if (!data["notebooks"]) data["notebooks"] = [];
|
if (!data["notebooks"]) data["notebooks"] = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user