Skip to content

Commit

Permalink
fix(constants): bug in isValidLevel implementation fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
eudaimos committed Apr 16, 2021
1 parent 5dd82c5 commit 64c3b08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rollbar/react",
"version": "0.7.1",
"version": "0.7.2",
"description": "React features to enhance using Rollbar.js in React Applications",
"main": "lib",
"module": "dist",
Expand Down
3 changes: 2 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ export function wrapValue(val, defaultAs) {
}

export function isValidLevel(level) {
return VALID_LEVELS[level] >= constants.LEVEL_DEBUG && VALID_LEVELS[level] <= constants.LEVEL_CRITICAL;
return VALID_LEVELS[level] >= VALID_LEVELS[constants.LEVEL_DEBUG]
&& VALID_LEVELS[level] <= VALID_LEVELS[constants.LEVEL_CRITICAL];
}

0 comments on commit 64c3b08

Please sign in to comment.