From 6dec7903b7afc2606077983072d088f469b662af Mon Sep 17 00:00:00 2001 From: r1tsuu Date: Fri, 3 Mar 2023 01:37:03 +0200 Subject: [PATCH] Fix undefined reference on amd64 macOS --- app/assets/js/assetguard.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/js/assetguard.js b/app/assets/js/assetguard.js index d5e4e9c0..6701a3b5 100644 --- a/app/assets/js/assetguard.js +++ b/app/assets/js/assetguard.js @@ -899,13 +899,13 @@ class JavaGuard extends EventEmitter { pathArr = JavaGuard._sortValidJavaArray(pathArr) if(pathArr.length > 0){ - let amd64Path = pathArr.find(({ isARM }) => !isARM).execPath - let armPath = pathArr.find(({ isARM }) => isARM).execPath + let amd64 = pathArr.find(({ isARM }) => !isARM) + let arm = pathArr.find(({ isARM }) => isARM) if (process.arch.includes("arm")) { - if (armPath) return armPath + if (arm) return arm.execPath return null } - return amd64Path + return amd64.execPath } else { return null }