Skip to content

Commit 2346b82

Browse files
author
cod1k
committed
Refactor cron monitor
Added JSDoc callback refference Removed redundant else in if-else block
1 parent 6828d30 commit 2346b82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/exports.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ export function captureCheckIn(checkIn: CheckIn, upsertMonitorConfig?: MonitorCo
150150
* Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.
151151
*
152152
* @param monitorSlug The distinct slug of the monitor.
153+
* @param callback Callback to be monitored
153154
* @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
154155
* to create a monitor automatically when sending a check in.
155156
*/
@@ -185,9 +186,8 @@ export function withMonitor<T>(
185186
throw e;
186187
},
187188
) as T;
188-
} else {
189-
finishCheckIn('ok');
190189
}
190+
finishCheckIn('ok');
191191

192192
return maybePromiseResult;
193193
});

0 commit comments

Comments
 (0)