Skip to content

Commit f0c7a25

Browse files
authored
build: fix lint failure (#20378)
Fixes a lint failure due to a few PRs landing in at the same time where one introduces a new lint rule.
1 parent 7a63ad6 commit f0c7a25

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/material-experimental/mdc-list/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ng_module(
2525
] + glob(["**/*.html"]),
2626
module_name = "@angular/material-experimental/mdc-list",
2727
deps = [
28+
"//src:dev_mode_types",
2829
"//src/cdk/collections",
2930
"//src/material/divider",
3031
"@npm//@angular/core",

src/material-experimental/mdc-list/interactive-list-base.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
AfterViewInit,
1212
Directive,
1313
ElementRef,
14-
HostListener, Inject, isDevMode,
14+
HostListener,
15+
Inject,
1516
OnDestroy,
1617
QueryList
1718
} from '@angular/core';
@@ -89,8 +90,7 @@ export abstract class MatInteractiveListBase<T extends MatListItemBase>
8990
}
9091

9192
ngAfterViewInit() {
92-
// TODO: Replace with `ngDevMode` build time check once #20146 is available.
93-
if (isDevMode() && !this._foundation) {
93+
if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._foundation) {
9494
throw Error('MDC list foundation not initialized for Angular Material list.');
9595
}
9696

src/material-experimental/mdc-list/selection-list.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
forwardRef,
2020
Inject,
2121
Input,
22-
isDevMode,
2322
OnChanges,
2423
OnDestroy,
2524
Output,
@@ -98,7 +97,7 @@ export class MatSelectionList extends MatInteractiveListBase<MatListOption>
9897
const newValue = coerceBooleanProperty(value);
9998

10099
if (newValue !== this._multiple) {
101-
if (isDevMode() && this._initialized) {
100+
if ((typeof ngDevMode === 'undefined' || ngDevMode) && this._initialized) {
102101
throw new Error(
103102
'Cannot change `multiple` mode of mat-selection-list after initialization.');
104103
}

0 commit comments

Comments
 (0)