Check for keyanti before accessing it

This commit is contained in:
Concedo 2024-06-13 12:54:23 +08:00
parent 4fddbab024
commit 92bbebb357

View file

@ -7,7 +7,7 @@ Just copy this single static HTML file anywhere and open it in a browser, or fro
Please go to https://github.com/LostRuins/lite.koboldai.net for updates on Kobold Lite.
If you are submitting a pull request for Lite, PLEASE use the above repo, not the KoboldCpp one.
Kobold Lite is under the AGPL v3.0 License unless otherwise exempted. Please do not remove this line.
Current version: 145
Current version: 146
-Concedo
-->
@ -5546,7 +5546,7 @@ Current version: 145
let nwi = {
"key": itm.key[0],
"keysecondary": (itm.keysecondary.length > 0 ? itm.keysecondary[0] : ""),
"keyanti": (itm.keyanti.length > 0 ? itm.keyanti[0] : ""),
"keyanti": (itm.keyanti && itm.keyanti.length > 0 ? itm.keyanti[0] : ""),
"content": itm.content,
"comment": itm.comment,
"folder": null,