Skip to content

Commit

Permalink
util(applyOverrides): log overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
ChlodAlejandro committed May 28, 2024
1 parent dd1c973 commit 7a5e82a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/util/applyOverrides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function applyOverrides(
if ( overrides ) {
for ( const category of Object.keys( data ) ) {
if ( !overrides[ category ] ) {
return; // Category does not exist.
continue; // Category does not exist.
}
for (
const categoryKey of
Expand All @@ -33,5 +33,17 @@ export default function applyOverrides(
overrides[ category ][ categoryKey ];
}
}
for ( const category of Object.keys( overrides ) ) {
if ( !data[ category ] ) {
data[ category ] = overrides[ category ];
if ( logger ) {
logger(
`${category}`,
data[ category ],
overrides[ category ]
);
}
}
}
}
}

0 comments on commit 7a5e82a

Please sign in to comment.