Refactor ZenKeyboardShortcuts to use async/await for initialization and handle potential error when retrieving active workspace from cache

This commit is contained in:
mauro-balades 2024-09-23 18:15:17 +02:00
parent a97e7e65ed
commit 58b7b402ac
2 changed files with 3 additions and 6 deletions

View file

@ -463,6 +463,7 @@ var gZenKeyboardShortcutsStorage = new class {
var gZenKeyboardShortcutsManager = {
async init() {
if (window.location.href == 'chrome://browser/content/browser.xhtml') {
await SessionStore.promiseInitialized;
console.info('Zen CKS: Initializing shortcuts');
this._currentShortcutList = await this._loadSaved();