File tree Expand file tree Collapse file tree
Lib/profiling/sampling/_heatmap_assets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -506,17 +506,14 @@ function toggleSpecView() {
506506 specViewEnabled = ! specViewEnabled ;
507507 const lines = document . querySelectorAll ( '.code-line' ) ;
508508
509- lines . forEach ( line => {
510- if ( specViewEnabled ) {
509+ if ( specViewEnabled ) {
510+ lines . forEach ( line => {
511511 const specColor = line . getAttribute ( 'data-spec-color' ) ;
512512 line . style . background = specColor || 'transparent' ;
513- } else {
514- const bgColor = colorMode === 'self'
515- ? line . getAttribute ( 'data-self-color' ) || line . getAttribute ( 'data-bg-color' )
516- : line . getAttribute ( 'data-cumulative-color' ) || line . getAttribute ( 'data-bg-color' ) ;
517- line . style . background = bgColor || 'transparent' ;
518- }
519- } ) ;
513+ } ) ;
514+ } else {
515+ applyLineColors ( ) ;
516+ }
520517
521518 applySpanHeatColors ( specViewEnabled ) ;
522519 updateToggleUI ( 'toggle-spec-view' , specViewEnabled ) ;
You can’t perform that action at this time.
0 commit comments