From e6d144879cd811bf31668f0f38c3474c75e831ce Mon Sep 17 00:00:00 2001 From: Gun Date: Fri, 18 Oct 2024 19:59:41 +0700 Subject: [PATCH] Recreate shortcuts file if not exist/deleted - ZenKeyboardShortcuts.mjs Recreate shortcuts file if not exist/deleted - ZenKeyboardShortcuts.mjs --- src/ZenKeyboardShortcuts.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ZenKeyboardShortcuts.mjs b/src/ZenKeyboardShortcuts.mjs index 61ab5e8..f5ba323 100644 --- a/src/ZenKeyboardShortcuts.mjs +++ b/src/ZenKeyboardShortcuts.mjs @@ -535,6 +535,8 @@ class ZenKeyboardShortcutsLoader { try { return await IOUtils.readJSON(this.shortcutsFile); } catch (e) { + // Recreate shortcuts file + Services.prefs.clearUserPref('zen.keyboard.shortcuts.version'); console.error('Error loading shortcuts file', e); return null; } @@ -1004,4 +1006,4 @@ document.addEventListener("MozBeforeInitialXULLayout", () => { if (Services.prefs.getBoolPref('zen.keyboard.shortcuts.enabled', false)) { gZenKeyboardShortcutsManager.beforeInit(); } -}, { once: true }); \ No newline at end of file +}, { once: true });