Skip to content

Commit 476a895

Browse files
committed
fix: test for page file context in download asset
1 parent a1c87d4 commit 476a895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layouts/_partials/assets/download.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{{ if not $error }}
2424
{{- $download = partial "utilities/GetTargetPath.html" (dict "path" $args.download "page" page) -}}
2525
{{- if and $download (not (fileExists (path.Join "static" $download))) -}}
26-
{{ if page }}
26+
{{ if page.File }}
2727
{{- errorf "Cannot find download file for page '%s': %s" page.File.Path $download -}}
2828
{{ else }}
2929
{{- errorf "Cannot find download file: %s" $download -}}

0 commit comments

Comments
 (0)