Skip to content

Commit c4d0a1b

Browse files
committed
Apply suggestion
1 parent eea0e39 commit c4d0a1b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/librustdoc/html/static/storage.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,7 @@ function switchTheme(newTheme, saveTheme) {
107107
var themeFile = themeName + resourcesSuffix + ".css";
108108
var themeSheet = document.querySelector("[href$='" + themeFile + "']");
109109

110-
if (themeName === newTheme) {
111-
themeSheet.disabled = false;
112-
} else {
113-
themeSheet.disabled = true;
114-
}
110+
themeSheet.disabled = themeName !== newTheme;
115111
});
116112
// If this new value comes from a system setting or from the previously saved theme, no
117113
// need to save it.

0 commit comments

Comments
 (0)