Auto merge of #61462 - GuillaumeGomez:fix-local-storage, r=Manishearth

[rustdoc] Fix storage usage when disabled

Fixes #61239.

@starblue: Can you give a try to this change please? I tried on chrome and firefox and both worked so if you're using another web browser, that might be useful. :)

r? @Manishearth
This commit is contained in:
bors 2019-07-12 12:04:25 +00:00
commit 71f9384e3b

View File

@ -64,13 +64,11 @@ function usableLocalStorage() {
// preferences deny access to localStorage, e.g., to prevent storage of
// "cookies" (or cookie-likes, as is the case here).
try {
window.localStorage;
return window.localStorage !== null && window.localStorage !== undefined;
} catch(err) {
// Storage is supported, but browser preferences deny access to it.
return false;
}
return true;
}
function updateLocalStorage(name, value) {