Skip to content

Commit adba735

Browse files
committed
Only log the warning if Angular is in dev mode.
1 parent 041fbf1 commit adba735

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/core/gestures/gesture-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Injectable} from '@angular/core';
1+
import {Injectable, isDevMode} from '@angular/core';
22
import {HammerGestureConfig} from '@angular/platform-browser';
33

44
/* Adjusts configuration of our gesture library, Hammer. */
@@ -19,7 +19,7 @@ export class GestureConfig extends HammerGestureConfig {
1919
constructor() {
2020
super();
2121

22-
if (!this._hammer) {
22+
if (!this._hammer && isDevMode()) {
2323
console.warn('Could not find HammerJS. Certain Angular Material may not work correctly.');
2424
}
2525
}

0 commit comments

Comments
 (0)