Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/YTVanced/vanced-website-v2
Browse files Browse the repository at this point in the history
…into dev
  • Loading branch information
bhatvikrant committed Feb 8, 2021
2 parents 45b5006 + 6dfe5b1 commit 3a35ee8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ ReactDOM.render(
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.register();
serviceWorker.unregister();
4 changes: 2 additions & 2 deletions src/serviceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const isLocalhost = Boolean(
export function register(config) {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
const publicUrl = new URL("https://vancedapp.com", window.location.href);
if (publicUrl.origin !== window.location.origin) {
// Our service worker won't work if PUBLIC_URL is on a different origin
// from what our page is served on. This might happen if a CDN is used to
Expand All @@ -32,7 +32,7 @@ export function register(config) {
}

window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
const swUrl = `https://vancedapp.com/service-worker.js`;

if (isLocalhost) {
// This is running on localhost. Let's check if a service worker still exists or not.
Expand Down

0 comments on commit 3a35ee8

Please sign in to comment.