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:
parent
05020a75ff
commit
eaa3ce9709
1 changed files with 1 additions and 1 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue