From eaa3ce9709abb5ae0a11ee4d218981d5b1af0bd9 Mon Sep 17 00:00:00 2001 From: CountBleck Date: Wed, 31 Aug 2022 17:53:03 -0700 Subject: [PATCH] Check the type of proxy being used properly The block inside `if (proxy == 'uv' || 'osana')` is always going to run, because 'osana' is a truthy value. I hope those aren't bad habits from Python. --- static/resources/nebula.bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/resources/nebula.bundle.js b/static/resources/nebula.bundle.js index 68e405a..12ac8f5 100644 --- a/static/resources/nebula.bundle.js +++ b/static/resources/nebula.bundle.js @@ -55,7 +55,7 @@ window.addEventListener('load', () => { if (typeof navigator.serviceWorker === 'undefined') alert('Your browser does not support service workers or you are in private browsing!'); - if (proxy == 'uv' || 'osana') { + if (proxy === 'uv' || proxy === 'osana') { navigator.serviceWorker.register('./sw.js', { scope: '/service/' }).then(() => {