Skip to content

Commit

Permalink
Correct loading path for fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
bstopp committed Nov 29, 2023
1 parent 453bb6d commit 2f4d1b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cigaradvisor/blocks/footer/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default async function decorate(block) {
block.textContent = '';

// load footer fragment
const footerPath = footerMeta.footer || '/footer';
const footerPath = footerMeta.footer || '/cigaradvisor/footer';
const fragment = await loadFragment(footerPath);

// decorate footer DOM
Expand Down
2 changes: 1 addition & 1 deletion cigaradvisor/blocks/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function toggleMenu(nav, navSections, forceExpanded = null) {
export default async function decorate(block) {
// load nav as fragment
const navMeta = getMetadata('nav');
const navPath = navMeta ? new URL(navMeta).pathname : '/nav';
const navPath = navMeta ? new URL(navMeta).pathname : '/cigaradvisor/nav';
const fragment = await loadFragment(navPath);

// decorate nav DOM
Expand Down

0 comments on commit 2f4d1b7

Please sign in to comment.