mirror of
https://github.com/directus/directus.git
synced 2026-01-24 11:18:04 -05:00
Don't check for latency if it doesn't exist yet
This commit is contained in:
@@ -22,6 +22,7 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
const avgLatency = computed(() => {
|
||||
if (!latencyStore.state.latency || latencyStore.state.latency.length === 0) return 0;
|
||||
const sorted = sortBy(latencyStore.state.latency, ['timestamp']);
|
||||
const lastFive = sorted.slice(Math.max(sorted.length - 5, 0));
|
||||
let total = 0;
|
||||
|
||||
Reference in New Issue
Block a user