From 35941d245f6d61200debe660f17cbcf48285f467 Mon Sep 17 00:00:00 2001 From: 1ilit <1ilit@proton.me> Date: Sun, 24 Aug 2025 19:14:25 +0400 Subject: [PATCH] clear versions cache on flush storgae --- src/components/EditorHeader/ControlPanel.jsx | 1 + src/i18n/locales/en.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/EditorHeader/ControlPanel.jsx b/src/components/EditorHeader/ControlPanel.jsx index 762e3a0..5463a05 100644 --- a/src/components/EditorHeader/ControlPanel.jsx +++ b/src/components/EditorHeader/ControlPanel.jsx @@ -1417,6 +1417,7 @@ export default function ControlPanel({ message: t("are_you_sure_flush_storage"), }, function: async () => { + localStorage.removeItem("versions_cache"); db.delete() .then(() => { Toast.success(t("storage_flushed")); diff --git a/src/i18n/locales/en.js b/src/i18n/locales/en.js index de53976..4d4efef 100644 --- a/src/i18n/locales/en.js +++ b/src/i18n/locales/en.js @@ -274,6 +274,7 @@ const en = { load_more: "Load more", clear_cache: "Clear cache", cache_cleared: "Cache cleared", + failed_to_record_version: "Failed to record version" }, };