Skip to content

Commit

Permalink
fix: check the .Page variable before precaching (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored Aug 8, 2023
1 parent cc28479 commit 23c9f8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/pwa/functions/precache.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{- with .URL }}
{{- $.Page.Store.Add "pwa-precache" (slice .) }}
{{- if and .Page .URL }}
{{- .Page.Store.Add "pwa-precache" (slice .URL) }}
{{- end }}

0 comments on commit 23c9f8e

Please sign in to comment.