duplicita již ne

This commit is contained in:
Histmy 2023-02-28 19:10:26 +01:00
parent 7b565024db
commit ef8bcbcd4b

View File

@ -6,7 +6,7 @@ createServer((_, res) => {
const customKomandy: KomandNaExport[] = module.exports.customKomandy; const customKomandy: KomandNaExport[] = module.exports.customKomandy;
const customAliasy: SRecord<string> = module.exports.customAliasy; const customAliasy: SRecord<string> = module.exports.customAliasy;
const vsechnyKomandy: KomandNaExport[] = [...komandy, ...customKomandy]; const vsechnyKomandy: KomandNaExport[] = JSON.parse(JSON.stringify([...komandy, ...customKomandy]));
for (const key in customAliasy) { for (const key in customAliasy) {
const i = vsechnyKomandy.findIndex(komand => komand.name == customAliasy[key]); const i = vsechnyKomandy.findIndex(komand => komand.name == customAliasy[key]);