浏览代码

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;
     }