Skip to content
Snippets Groups Projects
Verified Commit 7cc3b36f authored by Morgan Bazalgette's avatar Morgan Bazalgette
Browse files

Default when there is no applicationServerKey meta on the page

parent d23a03ea
Branches
No related tags found
No related merge requests found
Pipeline #
......@@ -19,7 +19,10 @@ const urlBase64ToUint8Array = (base64String) => {
return outputArray;
};
const getApplicationServerKey = () => document.querySelector('[name="applicationServerKey"]').getAttribute('content');
const getApplicationServerKey = () => {
const k = document.querySelector('[name="applicationServerKey"]');
return k === null ? '' : k.getAttribute('content');
}
const getRegistration = () => navigator.serviceWorker.ready;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment