From 2d9397dbb2e8b537c06e77085adb2974e1cc12d9 Mon Sep 17 00:00:00 2001 From: Semih ERDOGAN Date: Tue, 25 Oct 2022 15:09:59 +0300 Subject: [PATCH] fix finding lastIndex --- index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index a394b6b..5be28c2 100644 --- a/index.html +++ b/index.html @@ -237,7 +237,9 @@

) === -1 }); - const lastIndex = this.tags.indexOf(sameVersionTags[sameVersionTags.length - 1]) + const lastIndex = sameVersionTags.length > 0 ? + this.tags.indexOf(sameVersionTags[sameVersionTags.length - 1]) : + this.tags.indexOf(this.baseVersion) if (lastIndex < this.tags.length - 1) { sameVersionTags.push(this.tags[lastIndex + 1])