mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 17:07:07 +01:00
Xtra Type Cafety
This commit is contained in:
parent
b1bb41313f
commit
ac1bc95551
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user