From 6795be006d538ec3ba8a47b1780c88a7844060ee Mon Sep 17 00:00:00 2001 From: rhymes Date: Fri, 28 Feb 2020 18:35:15 +0100 Subject: [PATCH] Don't run the service worker on /enter (#6353) --- app/controllers/registrations_controller.rb | 4 ++-- app/views/service_worker/index.js.erb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index a28780723..7ef02297a 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -5,8 +5,8 @@ class RegistrationsController < Devise::RegistrationsController def new if user_signed_in? redirect_to "/dashboard?signed-in-already&t=#{Time.current.to_i}" - return + else + super end - super end end diff --git a/app/views/service_worker/index.js.erb b/app/views/service_worker/index.js.erb index 895075798..3f823b095 100644 --- a/app/views/service_worker/index.js.erb +++ b/app/views/service_worker/index.js.erb @@ -110,6 +110,7 @@ !url.href.includes('/sidekiq') && // Skip for Sidekiq dashboard !url.href.includes('/social_previews') && // Skip for social previews !url.href.includes('/users/auth') && // Don't run on authentication. + !url.href.includes('/enter') && // Don't run on registration. caches.match('/shell_top') && // Ensure shell_top is in the cache. caches.match('/shell_bottom')) { // Ensure shell_bottom is in the cache.