Skip to content

Commit

Permalink
rearrange condition
Browse files Browse the repository at this point in the history
  • Loading branch information
flovogt committed Dec 8, 2023
1 parent 1762b2b commit a0c5078
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/processors/manifestCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,15 +561,10 @@ async function createManifest(
const supportedLocalesArray = Array.from(supportedLocales);
supportedLocalesArray.sort();

let fallbackLocale;
if (supportedLocalesArray.length === 1) {
fallbackLocale = supportedLocalesArray[0];
}

return {
bundleUrl: i18n,
supportedLocales: supportedLocalesArray,
fallbackLocale
fallbackLocale: supportedLocalesArray.length === 1 ? supportedLocalesArray[0] : undefined
};
}

Expand Down

0 comments on commit a0c5078

Please sign in to comment.