File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,19 +183,16 @@ export async function populateCruxData(
183183 parsedTrace : DevTools . TraceEngine . TraceModel . ParsedTrace ,
184184) : Promise < void > {
185185 ensureCrUXManager ( ) ;
186- try {
187- const settings = DevTools . Common . Settings . Settings . instance ( ) ;
188- const cruxSetting = settings . createSetting < ConfigSetting > (
189- 'field-data' ,
190- { enabled : false } ,
191- DevTools . Common . Settings . SettingStorageType . GLOBAL ,
192- ) ;
193-
194- if ( ! cruxSetting . get ( ) . enabled ) {
195- return ;
196- }
197- } catch {
198- // Fallback if settings are not available
186+
187+ const settings = DevTools . Common . Settings . Settings . instance ( ) ;
188+ const cruxSetting = settings . createSetting (
189+ 'field-data' ,
190+ { enabled : true } ,
191+ DevTools . Common . Settings . SettingStorageType . GLOBAL ,
192+ ) ;
193+
194+ if ( ! cruxSetting . get ( ) . enabled ) {
195+ return ;
199196 }
200197
201198 const urls = new Set < string > ( ) ;
Original file line number Diff line number Diff line change 55 */
66
77import assert from 'node:assert' ;
8- import { describe , it , afterEach } from 'node:test' ;
8+ import { describe , it , afterEach , before } from 'node:test' ;
99
1010import sinon from 'sinon' ;
1111
@@ -20,6 +20,8 @@ import {ensureCrUXManager} from '../../src/utils/crux.js';
2020import { loadTraceAsBuffer } from '../trace-processing/fixtures/load.js' ;
2121
2222describe ( 'crux util' , ( ) => {
23+ before ( ( ) => ensureCrUXManager ( ) ) ;
24+
2325 afterEach ( ( ) => {
2426 sinon . restore ( ) ;
2527 } ) ;
You can’t perform that action at this time.
0 commit comments