Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
schlawg authored Oct 16, 2024
1 parent 27dba7f commit edb84b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/site/src/serviceWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { storage } from 'common/storage';

export default async function () {
if (!('serviceWorker' in navigator && 'Notification' in window && 'PushManager' in window)) return;
const workerUrl = new URL(assetUrl(jsModule('serviceWorker'), { pathOnly: true, version: false }), self.location.href);
const workerUrl = new URL(
assetUrl(jsModule('serviceWorker'), { pathOnly: true, version: false }),
self.location.href,
);
workerUrl.searchParams.set('asset-url', document.body.getAttribute('data-asset-url')!);
const reg = await navigator.serviceWorker.register(workerUrl.href, {
scope: '/',
Expand Down

0 comments on commit edb84b2

Please sign in to comment.