Skip to content

Commit

Permalink
build: fix lint failure (#20378)
Browse files Browse the repository at this point in the history
Fixes a lint failure due to a few PRs landing in at the same time where one introduces a new lint rule.
  • Loading branch information
crisbeto authored Aug 21, 2020
1 parent 7a63ad6 commit f0c7a25
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/material-experimental/mdc-list/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ng_module(
] + glob(["**/*.html"]),
module_name = "@angular/material-experimental/mdc-list",
deps = [
"//src:dev_mode_types",
"//src/cdk/collections",
"//src/material/divider",
"@npm//@angular/core",
Expand Down
6 changes: 3 additions & 3 deletions src/material-experimental/mdc-list/interactive-list-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
AfterViewInit,
Directive,
ElementRef,
HostListener, Inject, isDevMode,
HostListener,
Inject,
OnDestroy,
QueryList
} from '@angular/core';
Expand Down Expand Up @@ -89,8 +90,7 @@ export abstract class MatInteractiveListBase<T extends MatListItemBase>
}

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

Expand Down
3 changes: 1 addition & 2 deletions src/material-experimental/mdc-list/selection-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
forwardRef,
Inject,
Input,
isDevMode,
OnChanges,
OnDestroy,
Output,
Expand Down Expand Up @@ -98,7 +97,7 @@ export class MatSelectionList extends MatInteractiveListBase<MatListOption>
const newValue = coerceBooleanProperty(value);

if (newValue !== this._multiple) {
if (isDevMode() && this._initialized) {
if ((typeof ngDevMode === 'undefined' || ngDevMode) && this._initialized) {
throw new Error(
'Cannot change `multiple` mode of mat-selection-list after initialization.');
}
Expand Down

0 comments on commit f0c7a25

Please sign in to comment.