Skip to content

Commit

Permalink
feat(lib): update scripts/aem.js to aem.js@1.5.0 (adobe#313)
Browse files Browse the repository at this point in the history
Test URL: https://update-lib-aem-minor-1-5-0--aem-boilerplate--adobe.hlx.live/
Release Notes: https://github.com/adobe/aem-lib/releases/tag/v1.5.0

Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
  • Loading branch information
kptdobe and semantic-release-bot authored Dec 19, 2023
1 parent f513b69 commit b24fda6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/aem.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,10 @@ function decorateSections(main) {
const meta = readBlockConfig(sectionMeta);
Object.keys(meta).forEach((key) => {
if (key === 'style') {
const styles = meta.style.split(',').map((style) => toClassName(style.trim()));
const styles = meta.style
.split(',')
.filter((style) => style)
.map((style) => toClassName(style.trim()));
styles.forEach((style) => section.classList.add(style));
} else {
section.dataset[toCamelCase(key)] = meta[key];
Expand Down

0 comments on commit b24fda6

Please sign in to comment.