Skip to content

Commit

Permalink
fix(core): workaround on angular issue with isProdMode (#2603)
Browse files Browse the repository at this point in the history
fixes #2596
  • Loading branch information
IlyaSurmay authored and valorkin committed Sep 8, 2017
1 parent 4825015 commit f9665ac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/warn-once.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { isDevMode } from '@angular/core';

const _messagesHash: { [key: string]: boolean } = {};
const _hideMsg = !isDevMode() || typeof console === 'undefined' || !console.warn;
const _hideMsg = typeof console === 'undefined' || !console.warn;

export function warnOnce(msg: string): void {
if (_hideMsg || msg in _messagesHash) {
if (!isDevMode() || _hideMsg || msg in _messagesHash) {
return;
}

Expand Down

0 comments on commit f9665ac

Please sign in to comment.