Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 6eb3565

Browse files
smolijarvlasy
andauthored
♻️ Update operand order in level condition
Co-Authored-By: vlasy <vlasy@users.noreply.github.com>
1 parent e8b149e commit 6eb3565

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/sentry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const createSentryTransformStream = (options: CosmasOptions): any => {
2828
// tslint:disable-next-line:function-name
2929
public _transform(chunk: any, _encoding: string, callback: TransformCallback) {
3030
const obj = JSON.parse(chunk);
31-
if ((options.sentryLevel || levels.warn) <= obj.level) {
31+
if (obj.level >= (options.sentryLevel || levels.warn)) {
3232
withScope(scope => {
3333
scope.setLevel(PINO_TO_SENTRY[obj.level]);
3434
scope.setExtras(obj);

0 commit comments

Comments
 (0)