Skip to content

Commit 71f9384

Browse files
committedJul 12, 2019
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
2 parents cd1381e + 4eb19d1 commit 71f9384

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎src/librustdoc/html/static/storage.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,11 @@ function usableLocalStorage() {
6464
// preferences deny access to localStorage, e.g., to prevent storage of
6565
// "cookies" (or cookie-likes, as is the case here).
6666
try {
67-
window.localStorage;
67+
return window.localStorage !== null && window.localStorage !== undefined;
6868
} catch(err) {
6969
// Storage is supported, but browser preferences deny access to it.
7070
return false;
7171
}
72-
73-
return true;
7472
}
7573

7674
function updateLocalStorage(name, value) {

1 commit comments

Comments
 (1)

starblue commented on Jul 13, 2019

@starblue

I can confirm that nightly now works with Firefox 67.0.4 (64-bit). Thanks!

Please sign in to comment.