diff --git a/packages/docusaurus/src/commands/build.ts b/packages/docusaurus/src/commands/build.ts index 8dbde60280fb..4a11df5f1f1f 100644 --- a/packages/docusaurus/src/commands/build.ts +++ b/packages/docusaurus/src/commands/build.ts @@ -88,7 +88,7 @@ export default async function build( const results = await mapAsyncSequencial(orderedLocales, (locale) => { const isLastLocale = - i18n.locales.indexOf(locale) === i18n.locales.length - 1; + orderedLocales.indexOf(locale) === orderedLocales.length - 1; return tryToBuildLocale({locale, isLastLocale}); }); return results[0];