From f8670f0d5918a1b79e7c4d16f83cb18c19911ddc Mon Sep 17 00:00:00 2001 From: oupala Date: Fri, 22 Mar 2019 15:06:43 +0100 Subject: [PATCH] fix: filter content works again This commit fixes a bug where the filter content was not working any more on recent browsers. close #125 --- apaxy/theme/apaxy.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apaxy/theme/apaxy.js b/apaxy/theme/apaxy.js index 2cc43b8..f6ea87d 100644 --- a/apaxy/theme/apaxy.js +++ b/apaxy/theme/apaxy.js @@ -2,9 +2,8 @@ var uri = window.location.pathname.substr(1); if (uri.substring(uri.length - 1) !== '/') { var indexes = document.getElementsByClassName('indexcolname'); - var i = indexes.length; - while (i) { - var a = indexes[i].getElementsByTagName('a')[0]; + for (let i of indexes) { + var a = i.getElementsByTagName('a')[0]; a.href = '/' + a.getAttribute('href', 2); } }