Browse Source

Use a truthy check

Manav Rathi 1 năm trước cách đây
mục cha
commit
27047da08b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;
     }