Browse Source

null check

Michael Wang 4 năm trước cách đây
mục cha
commit
9c1339c6a6
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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;