Skip to content

Commit

Permalink
Merge pull request #14 from rhudea/v7only
Browse files Browse the repository at this point in the history
feat: v7 upgrade
  • Loading branch information
sdmcraft authored Dec 13, 2022
2 parents 5c63227 + 7195b90 commit 403d718
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions blocks/gnav/gnav.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ class Gnav {
const brand = brandBlock.querySelector('a');

const { className } = brandBlock;
const classNameClipped = className.slice(0, -1);
const classNames = classNameClipped.split('--');
brand.className = classNames.join(' ');
brand.className = className;
if (brand.classList.contains('with-logo')) {
brand.innerHTML = '';
const brandImg = document.createElement('img');
Expand Down
2 changes: 1 addition & 1 deletion helix-version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
v6
v7

2 changes: 1 addition & 1 deletion scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export function decorateBlock(block) {
if (!blockName) return;
const section = block.closest('.section-wrapper');
if (section) {
section.classList.add(`${blockName}-container`.replace(/--/g, '-'));
section.classList.add(`${classes.join('-')}-container`);
}
const trimDashes = (str) => str.replace(/(^\s*-)|(-\s*$)/g, '');
const blockWithVariants = blockName.split('--');
Expand Down

0 comments on commit 403d718

Please sign in to comment.