Recreate shortcuts file if not exist/deleted - ZenKeyboardShortcuts.mjs

Recreate shortcuts file if not exist/deleted -  ZenKeyboardShortcuts.mjs
This commit is contained in:
Gun 2024-10-18 19:59:41 +07:00 committed by GitHub
parent d853fa8de4
commit e6d144879c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -535,6 +535,8 @@ class ZenKeyboardShortcutsLoader {
try { try {
return await IOUtils.readJSON(this.shortcutsFile); return await IOUtils.readJSON(this.shortcutsFile);
} catch (e) { } catch (e) {
// Recreate shortcuts file
Services.prefs.clearUserPref('zen.keyboard.shortcuts.version');
console.error('Error loading shortcuts file', e); console.error('Error loading shortcuts file', e);
return null; return null;
} }