Fix protocol status badge not updating for active service with id 0

This commit is contained in:
Alice Gaudon 2020-11-27 14:47:11 +01:00
parent ada191e971
commit 79b79e0aec

View File

@ -772,7 +772,8 @@ function updateNavigation() {
}
function updateStatusButton() {
if (!selectedServiceId) return;
if (typeof selectedServiceId !== 'number') return;
const protocol = services[selectedServiceId]?.view?.getURL().split('://')[0] || 'unknown';
securityButton?.childNodes.forEach(el => {
if (el instanceof HTMLElement) {