File tree Expand file tree Collapse file tree 4 files changed +24
-22
lines changed
packages/animations/browser/src Expand file tree Collapse file tree 4 files changed +24
-22
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,10 @@ export class Animation {
3535 if ( errors . length ) {
3636 throw validationFailed ( errors ) ;
3737 }
38- if ( warnings . length ) {
39- warnValidation ( warnings ) ;
38+ if ( typeof ngDevMode === 'undefined' || ngDevMode ) {
39+ if ( warnings . length ) {
40+ warnValidation ( warnings ) ;
41+ }
4042 }
4143 this . _animationAst = ast ;
4244 }
Original file line number Diff line number Diff line change @@ -61,8 +61,10 @@ export class AnimationEngine {
6161 if ( errors . length ) {
6262 throw triggerBuildFailed ( name , errors ) ;
6363 }
64- if ( warnings . length ) {
65- warnTriggerBuild ( name , warnings ) ;
64+ if ( typeof ngDevMode === 'undefined' || ngDevMode ) {
65+ if ( warnings . length ) {
66+ warnTriggerBuild ( name , warnings ) ;
67+ }
6668 }
6769 trigger = buildTrigger ( name , ast , this . _normalizer ) ;
6870 this . _triggerCache [ cacheKey ] = trigger ;
Original file line number Diff line number Diff line change @@ -58,8 +58,10 @@ export class TimelineAnimationEngine {
5858 if ( errors . length ) {
5959 throw registerFailed ( errors ) ;
6060 } else {
61- if ( warnings . length ) {
62- warnRegister ( warnings ) ;
61+ if ( typeof ngDevMode === 'undefined' || ngDevMode ) {
62+ if ( warnings . length ) {
63+ warnRegister ( warnings ) ;
64+ }
6365 }
6466 this . _animations . set ( id , ast ) ;
6567 }
Original file line number Diff line number Diff line change @@ -15,31 +15,27 @@ function createListOfWarnings(warnings: string[]): string {
1515}
1616
1717export function warnValidation ( warnings : string [ ] ) : void {
18- ( typeof ngDevMode === 'undefined' || ngDevMode ) &&
19- console . warn ( `animation validation warnings:${ createListOfWarnings ( warnings ) } ` ) ;
18+ console . warn ( `animation validation warnings:${ createListOfWarnings ( warnings ) } ` ) ;
2019}
2120
2221export function warnTriggerBuild ( name : string , warnings : string [ ] ) : void {
23- ( typeof ngDevMode === 'undefined' || ngDevMode ) &&
24- console . warn (
25- `The animation trigger "${ name } " has built with the following warnings:${ createListOfWarnings (
26- warnings ,
27- ) } `,
28- ) ;
22+ console . warn (
23+ `The animation trigger "${ name } " has built with the following warnings:${ createListOfWarnings (
24+ warnings ,
25+ ) } `,
26+ ) ;
2927}
3028
3129export function warnRegister ( warnings : string [ ] ) : void {
32- ( typeof ngDevMode === 'undefined' || ngDevMode ) &&
33- console . warn ( `Animation built with the following warnings:${ createListOfWarnings ( warnings ) } ` ) ;
30+ console . warn ( `Animation built with the following warnings:${ createListOfWarnings ( warnings ) } ` ) ;
3431}
3532
3633export function triggerParsingWarnings ( name : string , warnings : string [ ] ) : void {
37- ( typeof ngDevMode === 'undefined' || ngDevMode ) &&
38- console . warn (
39- `Animation parsing for the ${ name } trigger presents the following warnings:${ createListOfWarnings (
40- warnings ,
41- ) } `,
42- ) ;
34+ console . warn (
35+ `Animation parsing for the ${ name } trigger presents the following warnings:${ createListOfWarnings (
36+ warnings ,
37+ ) } `,
38+ ) ;
4339}
4440
4541export function pushUnrecognizedPropertiesWarning ( warnings : string [ ] , props : string [ ] ) : void {
You can’t perform that action at this time.
0 commit comments