Skip to content

Commit

Permalink
Merge pull request #198 from hlxsites/fix-version-dd
Browse files Browse the repository at this point in the history
Fix: Hide version selector when there are no versions
  • Loading branch information
iansk authored Oct 16, 2023
2 parents 97c1858 + 53bb70c commit 5bca4d7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions blocks/article/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ function initVersionDropdown(wrapper) {
const versionButton = versionsDropdown.querySelector('.version-button');
const versionsDropdownMenuContainer = versionsContainer.querySelector('.version-dropdown-menu');
const curVersionKey = getMetadata('version');

if (!store.product || curVersionKey === 'not-applicable') {
if (!store.product || curVersionKey === 'not-applicable' || !curVersionKey) {
versionsContainer.remove();
return;
}
Expand Down

0 comments on commit 5bca4d7

Please sign in to comment.