Skip to content
Permalink
Browse files

refactor(core): use Object.entries when mapping makeTargets in the v5…

… importer
  • Loading branch information
malept committed Jul 16, 2019
1 parent 5fb8e55 commit 745e7689981ebf9fcc7fce5c4f411a3110fa7ae1
Showing with 4 additions and 3 deletions.
  1. +4 −3 packages/api/core/src/util/upgrade-forge-config.ts
@@ -7,12 +7,13 @@ import {
import path from 'path';
import { siblingDep } from '../api/init-scripts/init-npm';

type MakeTargets = { string: string[] };

function mapMakeTargets(forge5Config: any): Map<string, ForgePlatform[]> {
const makeTargets = new Map<string, ForgePlatform[]>();
if (forge5Config.makeTargets) {
// TODO: Use object.entries when dropping Node 6
for (const platform of Object.keys(forge5Config.makeTargets)) {
for (const target of forge5Config.makeTargets[platform]) {
for (const [platform, targets] of Object.entries(forge5Config.makeTargets as MakeTargets)) {
for (const target of targets) {
let platforms = makeTargets.get(target);
if (platforms === undefined) {
platforms = [];

0 comments on commit 745e768

Please sign in to comment.
You can’t perform that action at this time.