diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-29 13:21:37 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-29 13:21:37 +0100 |
commit | a642101c086f689fc6ba6c3e86ad16f24b95840c (patch) | |
tree | 32a540e4783b7bcce3b8e7c47b23cc8015433608 /bonus/git.cgi | |
parent | e51cfcd8ff2d05271e3a225419c9152098984ca7 (diff) | |
download | chawan-a642101c086f689fc6ba6c3e86ad16f24b95840c.tar.gz |
git.cgi: fix on older QJS versions
Array.prototype.at is not present in previous QJS releases.
Diffstat (limited to 'bonus/git.cgi')
-rwxr-xr-x | bonus/git.cgi | 2 |
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(' ')); |