The local storage API returns strings and has no way to set a default
value in case no value exists. We must therefore check for the "true"
string or the null value.
Let's extract it from the if boolean expression. We go from:
if (isWidescreen && (showSidebar === "true" || showSidebar === null))
To:
if (isWidescreen && showSidebar)
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
|
||
|---|---|---|
| .. | ||
| error.html | ||
| header.html | ||
| ident.html | ||
| layout.html | ||
| sidebar.html | ||
| source.html | ||
| topbar.html | ||
| tree.html | ||