From f24c8c21537168026301496a42ab4bb8bd5a1dd6 Mon Sep 17 00:00:00 2001 From: rakesh Date: Mon, 9 Jun 2025 22:41:33 +0530 Subject: [PATCH 1/2] prevent from crashing --- planet/js/ProjectStorage.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/planet/js/ProjectStorage.js b/planet/js/ProjectStorage.js index d606f1e511..602d829211 100644 --- a/planet/js/ProjectStorage.js +++ b/planet/js/ProjectStorage.js @@ -182,8 +182,10 @@ class ProjectStorage { await this.LocalStorage.setItem(key, jsonobj); const savedjsonobj = await this.LocalStorage.getItem(key); - if(savedjsonobj !== jsonobj) - throw new Error("Not enough space to save locally"); + // prevent unnecessary crashing + + if(savedjsonob == null) + throw new Error("Failed to save project data"); }; async get (key) { From e4c263cd5efb880b385c86683f7e9c7f7bb864a0 Mon Sep 17 00:00:00 2001 From: rakesh Date: Tue, 10 Jun 2025 00:52:13 +0530 Subject: [PATCH 2/2] spacing --- planet/js/ProjectStorage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planet/js/ProjectStorage.js b/planet/js/ProjectStorage.js index 602d829211..81059d2691 100644 --- a/planet/js/ProjectStorage.js +++ b/planet/js/ProjectStorage.js @@ -184,7 +184,7 @@ class ProjectStorage { // prevent unnecessary crashing - if(savedjsonob == null) + if (savedjsonob == null) throw new Error("Failed to save project data"); };