Conversation
| return true; | ||
| } | ||
| }); | ||
| if (found === true) { |
There was a problem hiding this comment.
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.
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.
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