We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cc5880 commit 17c6852Copy full SHA for 17c6852
1 file changed
src/material/autocomplete/autocomplete-trigger.ts
@@ -767,8 +767,15 @@ export class MatAutocompleteTrigger
767
}
768
769
private _attachOverlay(valueOnAttach: string): void {
770
- if (!this.autocomplete && (typeof ngDevMode === 'undefined' || ngDevMode)) {
771
- throw getMatAutocompleteMissingPanelError();
+ if (!this.autocomplete) {
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
772
+ throw getMatAutocompleteMissingPanelError();
773
+ } else {
774
+ // This shouldn't happen only in production mode, but some internal teams have
775
+ // observed it in their production logging. Return since the rest of the function
776
+ // assumes that the autocomplete is defined.
777
+ return;
778
+ }
779
780
781
let overlayRef = this._overlayRef;
0 commit comments