Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rename function to be more accurate
  • Loading branch information
coreyworrell committed Nov 16, 2022
commit 722c5856eafeafb8224a84a503a1aa1b4d7fd97c
4 changes: 2 additions & 2 deletions packages/block-library/src/navigation/view-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function navigationToggleModal( modal ) {
htmlElement.classList.toggle( 'has-modal-open' );
}

function isLinkToAnchorOnSamePage( node ) {
function isLinkToAnchorOnCurrentPage( node ) {
return (
node.hash &&
node.protocol === window.location.protocol &&
Expand All @@ -52,7 +52,7 @@ window.addEventListener( 'load', () => {
navigationLinks.forEach( function ( link ) {
// Ignore non-anchor links and anchor links which open on a new tab.
if (
! isLinkToAnchorOnSamePage( link ) ||
! isLinkToAnchorOnCurrentPage( link ) ||
link.attributes?.target === '_blank'
) {
return;
Expand Down