Skip to content

Commit

Permalink
Merge pull request #19 from vtex-apps/feature/disable-log-on-prod
Browse files Browse the repository at this point in the history
Feature/disable error on prod
  • Loading branch information
lbebber authored Aug 31, 2020
2 parents d2cfc89 + 70ba6cf commit 9fa02fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Modifier errors are only displayed on dev workspaces.

## [0.4.3] - 2020-08-31
### Changed
Expand Down
4 changes: 4 additions & 0 deletions react/applyModifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ const displayModifierErrors = debounce(() => {
* rather than a potentially huge wall of errors.
*/
function logModifierError(modifier: InvalidModifier) {
// eslint-disable-next-line no-undef
if (process.env.NODE_ENV !== 'development') {
return
}
invalidModifiers.add(modifier)
displayModifierErrors()
}
Expand Down

0 comments on commit 9fa02fd

Please sign in to comment.