mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Xtra Type Cafety
This commit is contained in:
@@ -812,6 +812,10 @@ function showTypeSpecificControls(type) {
|
|||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function insertMissingArrayItems(source, target) {
|
function insertMissingArrayItems(source, target) {
|
||||||
|
if (source === target || !Array.isArray(source) || !Array.isArray(target)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (const item of source) {
|
for (const item of source) {
|
||||||
if (!target.includes(item)) {
|
if (!target.includes(item)) {
|
||||||
const index = source.indexOf(item);
|
const index = source.indexOf(item);
|
||||||
|
Reference in New Issue
Block a user