Fix handling of modified source code URL setting

This commit is contained in:
nooptek
2023-08-19 00:25:54 +02:00
parent 99a5e9cbc4
commit 499aed37dd
2 changed files with 2 additions and 2 deletions

View File

@@ -214,7 +214,7 @@ module Invidious::Routes::PreferencesRoute
statistics_enabled ||= "off"
CONFIG.statistics_enabled = statistics_enabled == "on"
CONFIG.modified_source_code_url = env.params.body["modified_source_code_url"]?.try &.as(String)
CONFIG.modified_source_code_url = env.params.body["modified_source_code_url"]?.presence
File.write("config/config.yml", CONFIG.to_yaml)
end