File tree Expand file tree Collapse file tree
angular_devkit/build_angular/src/utils
build/src/utils/index-file Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export async function inlineCriticalCss(
5252 const cspNonce =
5353 nonceElement ?. getAttribute ( 'ngCspNonce' ) || nonceElement ?. getAttribute ( 'ngcspnonce' ) ;
5454
55- return cspNonce ;
55+ return cspNonce ?? undefined ;
5656 } ,
5757 noscriptFallback : true ,
5858 inlineFonts : true ,
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export class InlineCriticalCssProcessor extends Beasties {
3535 const cspNonce =
3636 nonceElement ?. getAttribute ( 'ngCspNonce' ) || nonceElement ?. getAttribute ( 'ngcspnonce' ) ;
3737
38- return cspNonce ;
38+ return cspNonce ?? undefined ;
3939 // eslint-disable-next-line @typescript-eslint/no-explicit-any
4040 } ) as any ,
4141 noscriptFallback : true ,
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export class InlineCriticalCssProcessor {
4545 const cspNonce =
4646 nonceElement ?. getAttribute ( 'ngCspNonce' ) || nonceElement ?. getAttribute ( 'ngcspnonce' ) ;
4747
48- return cspNonce ;
48+ return cspNonce ?? undefined ;
4949 } ,
5050 noscriptFallback : true ,
5151 inlineFonts : true ,
@@ -67,12 +67,12 @@ export class InlineCriticalCssProcessor {
6767 linkEl . removeAttribute ( 'data-beasties-media' ) ;
6868 linkEl . setAttribute ( 'media' , beastiesMedia ) ;
6969 if ( linkEl . next ?. name === 'noscript' ) {
70- linkEl . next . remove ( ) ;
70+ linkEl . next . remove ?. ( ) ;
7171 }
7272 // eslint-disable-next-line @typescript-eslint/no-explicit-any
7373 ( document as any ) . querySelectorAll ( 'script' ) . forEach ( ( script : any ) => {
7474 if ( script . textContent ?. includes ( 'data-beasties-media' ) ) {
75- script . remove ( ) ;
75+ script . remove ?. ( ) ;
7676 }
7777 } ) ;
7878 }
Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ minimumReleaseAgeExclude:
2424 - ' @ngtools/webpack'
2525 - ' @schematics/*'
2626 - ' ng-packagr'
27- # TODO(alanagius): remove before merging this.
28- - ' beasties'
2927overrides :
3028 ' @angular/build ' : workspace:*
3129packageExtensions :
You can’t perform that action at this time.
0 commit comments