refactor: use for-of
instead of for
simple array iteration (#39338)
This commit is contained in:
parent
67523a47b4
commit
3d45429667
5 changed files with 20 additions and 20 deletions
|
@ -133,14 +133,14 @@ describe('renderer nodeIntegrationInSubFrames', () => {
|
|||
|
||||
const generateConfigs = (webPreferences: any, ...permutations: {name: string, webPreferences: any}[]) => {
|
||||
const configs = [{ webPreferences, names: [] as string[] }];
|
||||
for (let i = 0; i < permutations.length; i++) {
|
||||
for (const permutation of permutations) {
|
||||
const length = configs.length;
|
||||
for (let j = 0; j < length; j++) {
|
||||
const newConfig = Object.assign({}, configs[j]);
|
||||
newConfig.webPreferences = Object.assign({},
|
||||
newConfig.webPreferences, permutations[i].webPreferences);
|
||||
newConfig.webPreferences, permutation.webPreferences);
|
||||
newConfig.names = newConfig.names.slice(0);
|
||||
newConfig.names.push(permutations[i].name);
|
||||
newConfig.names.push(permutation.name);
|
||||
configs.push(newConfig);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue