We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53c58b8 commit 376baccCopy full SHA for 376bacc
src/js/02-on-this-page.js
@@ -21,8 +21,9 @@
21
var list = headings.reduce(function (accum, heading) {
22
var link = document.createElement('a')
23
var headingWithoutLabels = heading.cloneNode(true)
24
- if (headingWithoutLabels.querySelector('span.label') != null)
+ if (headingWithoutLabels.querySelector('span.label') != null) {
25
headingWithoutLabels.removeChild(headingWithoutLabels.querySelector('span.label'))
26
+ }
27
link.textContent = headingWithoutLabels.textContent
28
links[(link.href = '#' + heading.id)] = link
29
var listItem = document.createElement('li')
0 commit comments