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.
This commit is contained in:
CountBleck 2022-08-31 17:53:03 -07:00
parent 05020a75ff
commit eaa3ce9709
No known key found for this signature in database

View file

@ -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(() => {