Skip to content

Commit

Permalink
chore(gatsby-source-contentful): fix locale debug output, again (#28582
Browse files Browse the repository at this point in the history
…) (#28623)

(cherry picked from commit 6a79ffc)

Co-authored-by: Peter van der Zee <209817+pvdz@users.noreply.github.com>
  • Loading branch information
LekoArts and pvdz authored Dec 15, 2020
1 parent 15cf4a2 commit 81175a5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/gatsby-source-contentful/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,17 @@ exports.sourceNodes = async (
const allLocales = locales
locales = locales.filter(pluginConfig.get(`localeFilter`))
reporter.verbose(
`All locales: ${allLocales}, default: ${defaultLocale}, after plugin.options.localeFilter: ${locales}`
`Default locale: ${defaultLocale}. All locales: ${allLocales
.map(({ code }) => code)
.join(`, `)}`
)
if (allLocales.length !== locales.length) {
reporter.verbose(
`After plugin.options.localeFilter: ${locales
.map(({ code }) => code)
.join(`, `)}`
)
}
if (locales.length === 0) {
reporter.panic({
id: CODES.LocalesMissing,
Expand Down

0 comments on commit 81175a5

Please sign in to comment.