Fix toggle_theme when visiting preferences with JS disabled

This commit is contained in:
Omar Roth 2019-06-04 19:58:56 -05:00
parent d6ec441c8e
commit 352e409a6e
No known key found for this signature in database
GPG key ID: B8254FB7EC3D37F2
2 changed files with 11 additions and 9 deletions

View file

@ -1487,7 +1487,7 @@ end
get "/toggle_theme" do |env|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
referer = get_referer(env)
referer = get_referer(env, unroll: false)
redirect = env.params.query["redirect"]?
redirect ||= "true"