Xtra Type Cafety

This commit is contained in:
Cohee 2024-09-28 13:59:03 +03:00
parent b1bb41313f
commit ac1bc95551
1 changed files with 4 additions and 0 deletions

View File

@ -812,6 +812,10 @@ function showTypeSpecificControls(type) {
* @returns {void}
*/
function insertMissingArrayItems(source, target) {
if (source === target || !Array.isArray(source) || !Array.isArray(target)) {
return;
}
for (const item of source) {
if (!target.includes(item)) {
const index = source.indexOf(item);