Xtra Type Cafety
| @@ -812,6 +812,10 @@ function showTypeSpecificControls(type) { | ||
| 812 | 812 | * @returns {void} |
| 813 | 813 | */ |
| 814 | 814 | function insertMissingArrayItems(source, target) { |
| 815 | + if (source === target || !Array.isArray(source) || !Array.isArray(target)) { | |
| 816 | + return; | |
| 817 | + } | |
| 818 | + | |
| 815 | 819 | for (const item of source) { |
| 816 | 820 | if (!target.includes(item)) { |
| 817 | 821 | const index = source.indexOf(item); |