forked from MapComplete/MapComplete
Updated documentation
This commit is contained in:
parent
bd07eed482
commit
e7ef2fb6d8
4 changed files with 19 additions and 13 deletions
7
Utils.ts
7
Utils.ts
|
@ -449,11 +449,10 @@ export class Utils {
|
|||
}
|
||||
|
||||
public static setDefaults(options, defaults){
|
||||
let result = {};
|
||||
for (let key of defaults){
|
||||
result[key] = key in options ? options[key] : defaults[key];
|
||||
for (let key in defaults){
|
||||
if (!(key in options)) options[key] = defaults[key];
|
||||
}
|
||||
return result;
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue