From f8ddb6b7bc3c0f4fdf63cfa0934c0702231682a6 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 11 Feb 2020 18:24:12 +0100 Subject: [PATCH] Fix anchor link in code --- www/code/inner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/code/inner.js b/www/code/inner.js index 5029b2b57..5b517c74c 100644 --- a/www/code/inner.js +++ b/www/code/inner.js @@ -174,8 +174,8 @@ define([ var privateData = framework._.cpNfInner.metadataMgr.getPrivateData(); href = privateData.origin + href; } else if (/^#/.test(href)) { - var target = document.getElementById(href.slice(1)); - target.scrollIntoView(); + var target = document.getElementById('cp-md-0-'+href.slice(1)); + if (target) { target.scrollIntoView(); } return; } framework._.sfCommon.openUnsafeURL(href);