forked from MapComplete/MapComplete
Fix: some fixes to make studio useable again, probably fixes #2139
This commit is contained in:
parent
f2fca2dad8
commit
6672fc87b4
4 changed files with 89 additions and 65 deletions
13
src/Utils.ts
13
src/Utils.ts
|
@ -401,6 +401,19 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
return newArr
|
||||
}
|
||||
|
||||
public static DedupT<T>(arr: T[]): T[]{
|
||||
if(!arr){
|
||||
return arr
|
||||
}
|
||||
const items = []
|
||||
for (const item of arr) {
|
||||
if(items.indexOf(item) < 0){
|
||||
items.push(item)
|
||||
}
|
||||
}
|
||||
return items
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds all duplicates in a list of strings
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue