Skip to content

Commit

Permalink
fix: properly handle workspaces.packages arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgee committed Aug 27, 2019
1 parent d8c4c90 commit 1a5929a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/utils/src/support/getWorkspacePackages.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const getWorkspacePackages = async packageFile => {
workspaces = rootPackage.workspaces
} else {
workspaces = rootPackage.workspaces.packages
if (!workspaces || !workspaces.isArray(workspaces)) {
reporter.debug(
if (!workspaces || !Array.isArray(workspaces)) {
reporter.warn(
'[release::getWorkspacePackage] Invalid workspaces key-value in root package.json'
)
return []
Expand All @@ -35,7 +35,7 @@ const getWorkspacePackages = async packageFile => {
)
}
} catch (e) {
reporter.debug(
reporter.warn(
'[release::getWorkspacePackage] Failed to load root package.json',
e
)
Expand Down

0 comments on commit 1a5929a

Please sign in to comment.