Skip to content

Commit 8799d3d

Browse files
committed
fix typo
1 parent 35ba7dd commit 8799d3d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/librustdoc/html/static/js/scrape-examples.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* global addClass, hasClass, removeClass, onEachLazy, nonnull */
1+
/* global addClass, hasClass, removeClass, onEachLazy, nonnull */
22

33
"use strict";
44

@@ -127,9 +127,10 @@
127127
* @param {boolean} isHidden
128128
*/
129129
function setupLoc(example, isHidden) {
130-
const locs_str = example.attributes.getNamedItem("data-locs")).textContent;
131-
const locs = example.locs =
132-
JSON.parse(nonnull(nonnull(locs_str));
130+
const locs_str = example.attributes.getNamedItem("data-locs").textContent;
131+
const locs =
132+
JSON.parse(nonnull(nonnull(locs_str)));
133+
example.locs = locs;
133134
// Start with the first example in view
134135
scrollToLoc(example, locs[0][0], isHidden);
135136
}

0 commit comments

Comments
 (0)