From a8da6b5a0e6bafb293cae56770cf477e9a94d50f Mon Sep 17 00:00:00 2001 From: Shem Date: Mon, 5 Aug 2024 14:29:50 +0300 Subject: [PATCH] Update index.js If there's no branch, prefer to return null, since many repos are now using "main" as default --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index bce8dd2..0af76c1 100644 --- a/index.js +++ b/index.js @@ -23,7 +23,7 @@ function getBranch(str, obj) { if (!branch && obj.hash && obj.hash.charAt(0) === '#') { branch = obj.hash.slice(1); } - return branch || 'master'; + return branch; } function trimSlash(path) {