Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bbarry authored Jan 10, 2022
1 parent fda9ceb commit cf6f7c9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export function loadTranslations(
logger: { warn: (message: string) => void; error: (message: string) => void },
usedFormats?: Set<string>,
) {
let translations: Record<string, unknown>|null = null;
let translations: Record<string, unknown>|undefined = undefined;
for (const file of desc.files) {
const loadResult = loader(path.join(workspaceRoot, file.path));

Expand All @@ -305,7 +305,7 @@ export function loadTranslations(
file.format = loadResult.format;
file.integrity = loadResult.integrity;

if (desc.translation) {
if (translations) {
// Merge translations
for (const [id, message] of Object.entries(loadResult.translations)) {
if (translations[id] !== undefined) {
Expand Down

0 comments on commit cf6f7c9

Please sign in to comment.