switch (marker.name) {
case 'Navigation::Start':
color = 'var(--grey-40)';
break;
case 'Load':
color = 'var(--red-60)';
break;
case 'DOMContentLoaded':
color = 'var(--blue-50)';
break;
default:
if (marker.name.startsWith('Contentful paint ')) {
color = 'var(--green-60)';
}
}
This code gives a wrong color output for me:
It starts to be wrong with the first
case
: