Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
Enforced 'tcomb.fail(msg)' to only log errors
Browse files Browse the repository at this point in the history
  • Loading branch information
artkravchenko committed Oct 18, 2016
1 parent faaf988 commit 4fed453
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ import { API_HOST } from '../config';
import ApiClient from '../api/client';
import { initState } from '../store';

/* to get rid of throwed errors by default */
if (process.env.NODE_ENV === 'development') {
const t = require('tcomb');
t.fail = msg => console.error('[tcomb] '.concat(msg)); // eslint-disable-line no-console
}

bluebird.longStackTraces();
window.Promise = bluebird;

Expand Down

0 comments on commit 4fed453

Please sign in to comment.