feat(debug): Added PWA_APP_DEBUG_MODE

This commit is contained in:
Silvio Leite
2019-12-08 18:00:40 -03:00
parent 1e71602bfe
commit 595c258ca0
2 changed files with 5 additions and 0 deletions

View File

@@ -39,10 +39,14 @@
scope: '{{ PWA_APP_SCOPE }}'
}).then(function (registration) {
// Registration was successful
{% if PWA_APP_DEBUG_MODE %}
console.log('django-pwa: ServiceWorker registration successful with scope: ', registration.scope);
{% endif %}
}, function (err) {
// registration failed :(
{% if PWA_APP_DEBUG_MODE %}
console.log('django-pwa: ServiceWorker registration failed: ', err);
{% endif %}
});
}
</script>