From 64c3b08c4f9beecf580549e08cb8ac417c73db36 Mon Sep 17 00:00:00 2001 From: Jeff Hoffer Date: Fri, 16 Apr 2021 15:13:28 -0700 Subject: [PATCH] fix(constants): bug in isValidLevel implementation fixed --- package.json | 2 +- src/utils.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8a93df3..b8ec04f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/utils.js b/src/utils.js index d3c3903..ac6dd19 100644 --- a/src/utils.js +++ b/src/utils.js @@ -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]; }