diff --git a/internal/httpsrv/static/index.html b/internal/httpsrv/static/index.html
index 549d0c6..6fe7337 100644
--- a/internal/httpsrv/static/index.html
+++ b/internal/httpsrv/static/index.html
@@ -118,7 +118,7 @@ async function refreshConnections() {
rows.appendChild(tr);
}
}
- document.getElementById('meta').textContent = '— ' + j.tunnels.length + ' tunnels';
+ document.getElementById('meta').textContent = '— ' + ((j.tunnels || []).length) + ' tunnels';
} catch (e) {
document.getElementById('meta').textContent = '— api error';
}