Skip to content

Commit b0e8ac6

Browse files
committed
refactor(Hub): early return for hub available
1 parent a03ec4a commit b0e8ac6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/unityHub.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ class UnityHub {
9292
*/
9393
public static async isUnityHubAvailable(): Promise<boolean> {
9494
try {
95-
if (!this.hubPath || !fs.existsSync(this.hubPath)) {
96-
return false;
97-
} else {
98-
return true;
99-
}
95+
return !this.hubPath || !fs.existsSync(this.hubPath);
10096
} catch (error) {
10197
console.error("Error checking Unity Hub availability:", error);
10298
return false;

0 commit comments

Comments
 (0)