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.
This commit is contained in:
Raymond Hill 2021-10-26 08:54:04 -04:00
parent c136c7b454
commit 5bea149e8f
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -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;
}