From 5bea149e8fd78f4da3585aa2e91863306e77b491 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 26 Oct 2021 08:54:04 -0400 Subject: [PATCH] Fix spurious errors in uBO's dev console Those spurious errors occurred when launching the browser with the dashboard already opened from the previous browsing session. --- src/js/dashboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/dashboard.js b/src/js/dashboard.js index 11b78ea22..f391b7c51 100644 --- a/src/js/dashboard.js +++ b/src/js/dashboard.js @@ -118,7 +118,7 @@ if ( self.location.hash.slice(1) === 'no-dashboard.html' ) { ]); { - const details = results[0]; + const details = results[0] || {}; document.body.classList.toggle( 'canUpdateShortcuts', details.canUpdateShortcuts === true @@ -132,7 +132,7 @@ if ( self.location.hash.slice(1) === 'no-dashboard.html' ) { } { - let pane = results[1]; + let pane = results[1] || null; if ( self.location.hash !== '' ) { pane = self.location.hash.slice(1) || null; }