MV [SOLVED] YEP Ext Messages Extended Choices breaking a plugin with choice popup

Hello. I've been testing plugins for a project I want to make but I've run into an issue-- there's a swimming plugin I wanted to use, but when I try to use it alongside YEPExtMesPack1, the modifications to the choice coding cause a crash with the swimming plugin's choice windows. I've attached an image of the crash error. (I have already tested in a test project with only the relevant plugins to make sure it's only an incompatibility with these two.) I'm pretty sure the problem is in Tsukimi's function askSwimDive (starting at line 881 in my translated version), but I don't really know enough about JavaScript to make the necessary changes myself.

As a note, Tsukimi's Swimming Plugin as linked in the topic doesn't work by default; I had to sloppily go through and translate the parameters so they were compatible with English MV. As the plugin terms allow redistributing it, I've attached my English fix for the purpose of debugging this (well. I guess people can also just use it. As far as I can tell, it works fine as long as it's not with a plugin that conflicts with choice windows.)

If I need to provide any more information please let me know. I followed the guidelines as best I could but I only just joined.
Bump to add that I think I have narrowed down what the problem is, but I have no idea how to fix it.

There's a code in the YEP plugin that, after going through choices index, attempts to read an index+1. This works for the purpose of extending a choice window (and using a choice window presumably has some sort of escape clause attached), but the swimming plugin is hooking directly into that choice algorithm, and so it might be trying to find additional indices that don't exist (which would explain why it's returning undefined).

I'm not a programmer by any means, so my interpretation might be completely off, but if that is the case, does anyone know a way for me to modify how the swimming plugin calls on this code so it stops looking for the nonexistent indices?

EDIT: Okay, I talked to some programmer friends and my hunch was correct. The fix wound up being to place a conditional if (this._index < this._list.length - 1) around the entire if (cmd.code === 404 && this._list[this._index + 1].code !== 102) block that does nothing if false so it doesn't look for more entries after a 404 unless more entries exist. That solved the problem while also still preserving the extended choices functionality of the original plugin. With that, I no longer need advice on the issue.

Original thread: https://forums.rpgmakerweb.com/threads/solved-yep-ext-messages-extended-choices-breaking-a-plugin-with-choice-popup.178706/