about summary refs log tree commit diff
path: root/src/librustdoc/html/static/storage.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-08-28 21:42:52 +0000
committerbors <bors@rust-lang.org>2019-08-28 21:42:52 +0000
commit0414dfa0aa072b6e1153ae60f94de852c07bb803 (patch)
tree3cc8486d52afbbd2eb19afc85a5766b93bcdbfaa /src/librustdoc/html/static/storage.js
parent17e73e801a75559eac5c932ff07bd9c8499a1364 (diff)
parent06228d33cac6770653d6798cf5f80d1269e5482d (diff)
downloadrust-0414dfa0aa072b6e1153ae60f94de852c07bb803.tar.gz
rust-0414dfa0aa072b6e1153ae60f94de852c07bb803.zip
Auto merge of #62941 - GuillaumeGomez:save-crate-filter, r=Mark-Simulacrum
Save crate filtering on rustdoc

Fixes #62929.

I added a hashmap and a hash encoding for the current crate list in case you have multiple crates handling on a same website (who talked about docs.rs?!). Like that, for each context, you have the filter crate selected.

r? @QuietMisdreavus
Diffstat (limited to 'src/librustdoc/html/static/storage.js')
-rw-r--r--src/librustdoc/html/static/storage.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/storage.js b/src/librustdoc/html/static/storage.js
index c55b1e41443..9d30e7ee79b 100644
--- a/src/librustdoc/html/static/storage.js
+++ b/src/librustdoc/html/static/storage.js
@@ -57,7 +57,7 @@ function onEachLazy(lazyArray, func, reversed) {
 
 function usableLocalStorage() {
     // Check if the browser supports localStorage at all:
-    if (typeof(Storage) === "undefined") {
+    if (typeof Storage === "undefined") {
         return false;
     }
     // Check if we can access it; this access will fail if the browser