From a642101c086f689fc6ba6c3e86ad16f24b95840c Mon Sep 17 00:00:00 2001 From: bptato Date: Fri, 29 Mar 2024 13:21:37 +0100 Subject: git.cgi: fix on older QJS versions Array.prototype.at is not present in previous QJS releases. --- bonus/git.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bonus/git.cgi') diff --git a/bonus/git.cgi b/bonus/git.cgi index a23e0060..1f93862a 100755 --- a/bonus/git.cgi +++ b/bonus/git.cgi @@ -10,7 +10,7 @@ * (if you have ansi2html, it also works with w3m. just set GITCHA_CHA=w3m) */ const gitcha = std.getenv("GITCHA_GITCHA") ?? "gitcha"; -if (scriptArgs[0].split('/').at(-1) == gitcha) { +if (scriptArgs[0].split('/').pop() == gitcha) { const cha = std.getenv("GITCHA_CHA") ?? 'cha'; const params = encodeURIComponent(scriptArgs.slice(1) .map(x => encodeURIComponent(x)).join(' ')); -- cgit 1.4.1-2-gfad0