فهرست منبع

Use a truthy check

Manav Rathi 1 سال پیش
والد
کامیت
27047da08b
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      desktop/src/main/log.ts

+ 1 - 1
desktop/src/main/log.ts

@@ -34,7 +34,7 @@ export function logErrorSentry(
 }
 
 const logError1 = (message: string, e?: unknown) => {
-    if (e === undefined || e === null) {
+    if (!e) {
         log.error(message);
         return;
     }