Fix anchor link in code

pull/1/head
yflory 5 years ago
parent a6e3208dff
commit f8ddb6b7bc

@ -174,8 +174,8 @@ define([
var privateData = framework._.cpNfInner.metadataMgr.getPrivateData(); var privateData = framework._.cpNfInner.metadataMgr.getPrivateData();
href = privateData.origin + href; href = privateData.origin + href;
} else if (/^#/.test(href)) { } else if (/^#/.test(href)) {
var target = document.getElementById(href.slice(1)); var target = document.getElementById('cp-md-0-'+href.slice(1));
target.scrollIntoView(); if (target) { target.scrollIntoView(); }
return; return;
} }
framework._.sfCommon.openUnsafeURL(href); framework._.sfCommon.openUnsafeURL(href);

Loading…
Cancel
Save