perf(common): use `ngDevMode` to tree-shake warnings (#39964) · angular/angular@bf3de9b

@@ -6,7 +6,7 @@

66

* found in the LICENSE file at https://angular.io/license

77

*/

889-

import {Directive, DoCheck, EmbeddedViewRef, Input, isDevMode, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, NgIterable, TemplateRef, TrackByFunction, ViewContainerRef} from '@angular/core';

9+

import {Directive, DoCheck, EmbeddedViewRef, Input, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, NgIterable, TemplateRef, TrackByFunction, ViewContainerRef} from '@angular/core';

10101111

/**

1212

* @publicApi

@@ -159,7 +159,7 @@ export class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCh

159159

*/

160160

@Input()

161161

set ngForTrackBy(fn: TrackByFunction<T>) {

162-

if (isDevMode() && fn != null && typeof fn !== 'function') {

162+

if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {

163163

// TODO(vicb): use a log service once there is a public one available

164164

if (<any>console && <any>console.warn) {

165165

console.warn(