@@ -295,7 +295,7 @@ export class ScriptManager extends EventEmitter {
295
295
this . emit ( 'resolving' , { scriptId, caller } ) ;
296
296
297
297
// Check if there are any taps in the resolve hook
298
- const hasResolveHooks = this . hooks . resolve . taps . length > 0 ;
298
+ const _hasResolveHooks = this . hooks . resolve . taps . length > 0 ;
299
299
300
300
let locator : ScriptLocator | undefined ;
301
301
@@ -359,9 +359,9 @@ export class ScriptManager extends EventEmitter {
359
359
}
360
360
361
361
// Only call resolve hook if it wasn't called during resolution
362
- if ( ! hasResolveHooks ) {
363
- await this . hooks . resolve . promise ( { scriptId, caller } ) ;
364
- }
362
+ // if (!hasResolveHooks) {
363
+ await this . hooks . resolve . promise ( { scriptId, caller } ) ;
364
+ // }
365
365
await this . hooks . afterResolve . promise ( { scriptId, caller } ) ;
366
366
this . emit ( 'resolved' , script . toObject ( ) ) ;
367
367
@@ -430,12 +430,12 @@ export class ScriptManager extends EventEmitter {
430
430
await this . hooks . beforeLoad . promise ( { scriptId, caller } ) ;
431
431
this . emit ( 'loading' , script . toObject ( ) ) ;
432
432
433
- const hasLoadHooks = this . hooks . load . taps . length > 0 ;
434
- if ( hasLoadHooks ) {
435
- await this . hooks . load . promise ( { scriptId, caller } ) ;
436
- } else {
437
- await this . loadScriptWithRetry ( scriptId , script . locator ) ;
438
- }
433
+ const _hasLoadHooks = this . hooks . load . taps . length > 0 ;
434
+ // if (hasLoadHooks) {
435
+ await this . hooks . load . promise ( { scriptId, caller } ) ;
436
+ // } else {
437
+ await this . loadScriptWithRetry ( scriptId , script . locator ) ;
438
+ // }
439
439
440
440
await this . hooks . afterLoad . promise ( { scriptId, caller } ) ;
441
441
this . emit ( 'loaded' , script . toObject ( ) ) ;
0 commit comments