From 4d2b8e9d152646f9c04351779b93a1789d317183 Mon Sep 17 00:00:00 2001 From: Kumi Date: Wed, 18 Sep 2024 15:08:35 +0200 Subject: [PATCH] fix(errors): correct typo in string method name Corrected the method name from `startswith?` to `starts_with?` in the error redirect helper. This change ensures proper redirection functionality and prevents potential runtime errors due to incorrect method calls. --- src/invidious/helpers/errors.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/helpers/errors.cr b/src/invidious/helpers/errors.cr index 718ee3e1..1d2d1b33 100644 --- a/src/invidious/helpers/errors.cr +++ b/src/invidious/helpers/errors.cr @@ -180,7 +180,7 @@ def error_redirect_helper(env : HTTP::Server::Context) go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube") switch_instance = translate(locale, "Switch Invidious Instance") - if request_path.startswith?("/watch") && CONFIG.alltube_url + if request_path.starts_with?("/watch") && CONFIG.alltube_url go_to_alltube = translate(locale, "next_steps_error_message_go_to_alltube") alltube_part = <<-END_HTML