From d1eda759fc02ddfd88abe074df0274b1839f0dd1 Mon Sep 17 00:00:00 2001 From: Chris Barber Date: Thu, 14 Dec 2017 00:17:47 -0600 Subject: [PATCH] [DAEMON-209] Fixed bug where extract teams from provisioning profiles would fail if any provisioning profiles didn't have any associated teams. --- CHANGELOG.md | 5 +++++ package.json | 2 +- src/teams.js | 8 +++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98650db..611c31c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# v2.0.6 (Dec 14, 2017) + + - Fixed bug where extract teams from provisioning profiles would fail if any provisioning profiles + didn't have any associated teams [DAEMON-209]. + # v2.0.5 (Dec 12, 2017) - Updated to node-ios-device@1.5.0 which added support for Node.js 9. diff --git a/package.json b/package.json index 1831910..b87d1b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ioslib", - "version": "2.0.5", + "version": "2.0.6", "publishConfig": { "tag": "next" }, diff --git a/src/teams.js b/src/teams.js index c9bd29d..5c1b455 100644 --- a/src/teams.js +++ b/src/teams.js @@ -31,9 +31,11 @@ export function buildTeamsFromProvisioningProfiles(profiles) { for (const type of Object.keys(profiles)) { if (Array.isArray(profiles[type])) { for (const profile of profiles[type]) { - for (const id of profile.teamIds) { - if (id) { - teams[id] = id; + if (Array.isArray(profile.teamIds)) { + for (const id of profile.teamIds) { + if (id) { + teams[id] = id; + } } } if (profile.teamId) {