mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 09:26:33 +01:00
9 lines
264 B
JavaScript
9 lines
264 B
JavaScript
|
if (!Array.prototype.findLastIndex) {
|
||
|
Array.prototype.findLastIndex = function (callback, thisArg) {
|
||
|
for (let i = this.length - 1; i >= 0; i--) {
|
||
|
if (callback.call(thisArg, this[i], i, this)) return i;
|
||
|
}
|
||
|
return -1;
|
||
|
};
|
||
|
}
|