-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rustdoc theme securities #48381
Rustdoc theme securities #48381
Conversation
return true; | ||
} | ||
}); | ||
if (found === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kinda want to see a fallback to "main" here, in case there is something amiss in local storage? Right now it just... does nothing, if this function is called with a name that doesn't match any of the available themes. To the user, this is the same as defaulting to "main", but i'd like to see that codified here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already the case. The last imported style is the main one. So if we do nothing, the main one will remain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. What i was really after was "overwrite invalid local storage value with 'main'" but i think i'll just let it slide, in case there's a collision with some other local storage key, or with different versions in case we add new themes later on.
@bors r+ |
📌 Commit 8d51c33 has been approved by |
…ties, r=QuietMisdreavus Rustdoc theme securities rust-lang#48381 Fixes rust-lang#48375. Fixes rust-lang#48376.
…ties, r=QuietMisdreavus Rustdoc theme securities Fixes rust-lang#48375. Fixes rust-lang#48376. r? @steveklabnik cc @QuietMisdreavus
Fixes #48375.
Fixes #48376.
r? @steveklabnik
cc @QuietMisdreavus