diff --git a/extension/script/add-search-index.js b/extension/script/add-search-index.js index 91bbf756..2f432e99 100644 --- a/extension/script/add-search-index.js +++ b/extension/script/add-search-index.js @@ -95,7 +95,7 @@ function getVar(name) { // https://github.com/rust-lang/rust/pull/113094 has change the way to get meta variable. const el = document.querySelector("head > meta[name='rustdoc-vars']") || document.getElementById("rustdoc-vars"); - return el ? el.attributes["data-" + name].value : null; + return el ? el.attributes["data-" + name]?.value : null; } function resourcePath(basename, extension) {