_includes/foot/pwaupdate.html in askclass-course-theme-0.5.2 vs _includes/foot/pwaupdate.html in askclass-course-theme-0.6.0
- old
+ new
@@ -1,6 +1,7 @@
-{% assign file = site.static_files | where: "path", "/pwabuilder-sw.js" %}
-{% if file.size != 0 %}
+{% assign pwafile = site.static_files | where: "path", "/pwabuilder-sw.js" %}
+{% assign offlinefile = site.static_files | where: "path", "/offline.html" %}
+{% if file.size != 0 && offlinefile.size != 0 %}
<script defer type="module">
import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate';
const el = document.createElement('pwa-update');
document.body.appendChild(el);
</script>