浏览代码

null check

Michael Wang 4 年之前
父节点
当前提交
9c1339c6a6
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/utils/nativeExe.js

+ 5 - 1
src/utils/nativeExe.js

@@ -92,7 +92,11 @@ export function nodeCheckRemoteDesktop() {
     .nodeRequire("child_process")
     .execSync("tasklist")
     .toString();
-  if (appList && appList.match(/sunloginclient/gi).length > 0) {
+  if (
+    appList &&
+    appList.match(/sunloginclient/gi) &&
+    appList.match(/sunloginclient/gi).length > 0
+  ) {
     return true;
   } else {
     return false;