Skip to content

Commit 64c3b08

Browse files
committed
fix(constants): bug in isValidLevel implementation fixed
1 parent 5dd82c5 commit 64c3b08

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rollbar/react",
3-
"version": "0.7.1",
3+
"version": "0.7.2",
44
"description": "React features to enhance using Rollbar.js in React Applications",
55
"main": "lib",
66
"module": "dist",

src/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ export function wrapValue(val, defaultAs) {
1414
}
1515

1616
export function isValidLevel(level) {
17-
return VALID_LEVELS[level] >= constants.LEVEL_DEBUG && VALID_LEVELS[level] <= constants.LEVEL_CRITICAL;
17+
return VALID_LEVELS[level] >= VALID_LEVELS[constants.LEVEL_DEBUG]
18+
&& VALID_LEVELS[level] <= VALID_LEVELS[constants.LEVEL_CRITICAL];
1819
}

0 commit comments

Comments
 (0)