about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xbonus/git.cgi2
1 files changed, 1 insertions, 1 deletions
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(' '));