Skip to content

Commit 77ad31e

Browse files
committed
Update interactivity-router plugin to improve URL handling in navigation. Changed the construction of urlRegionDisplay to directly use the target's href, enhancing clarity in console logs. Updated asset version in view.asset.php for consistency.
1 parent 9df1e53 commit 77ad31e

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => '7f443473ef56f95562ff', 'type' => 'module');
1+
<?php return array('dependencies' => array('@wordpress/interactivity', array('id' => '@wordpress/interactivity-router', 'import' => 'dynamic')), 'version' => 'f490aadf565df2afd7b2', 'type' => 'module');

plugins/interactivity-router-2f43f8/build/view.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/interactivity-router-2f43f8/build/view.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/interactivity-router-2f43f8/src/view.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ const { state } = store( 'router-2f43f8', {
4444
const { actions } = yield import(
4545
'@wordpress/interactivity-router'
4646
);
47-
48-
state.urlRegionDisplay = state.base_url + '/' + e.target.href;
49-
console.log( 'mavigating to ', state.urlRegionDisplay );
47+
state.urlRegionDisplay = e.target.href;
48+
console.log( 'Navigating to: ', state.urlRegionDisplay );
49+
console.log( 'Base URL: ', state.base_url );
5050
yield actions.navigate( e.target.href );
5151
},
5252
*prefetch() {

0 commit comments

Comments
 (0)